From 212d69a4e95cec300ecde2df248f2b5d3ab00b0c Mon Sep 17 00:00:00 2001 From: idziubenko Date: Mon, 29 Nov 2021 14:20:10 +0300 Subject: [PATCH] added system error code for failed install due to build already present --- pym/calculate/lib/datavars.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pym/calculate/lib/datavars.py b/pym/calculate/lib/datavars.py index 573ad55..838ac42 100644 --- a/pym/calculate/lib/datavars.py +++ b/pym/calculate/lib/datavars.py @@ -102,6 +102,10 @@ class CommonVariableError(VariableError): """Exception for command line""" +class BuildAlreadyInstalledError(VariableError): + """Exception for install -U when used after a successful install""" + + def makePath(dirs, mode=755): if not path.exists(dirs): os.makedirs(dirs, mode) @@ -1990,7 +1994,8 @@ class DataVars(SimpleDataVars): messages = e.exception_list if e.exception_list else [e] mess = "\n".join((str(x) for x in messages)) mapError = {PasswordError: 'pwderror', - CommonVariableError: 'commonerror'} + CommonVariableError: 'commonerror', + BuildAlreadyInstalledError: 'sysinstalled'} for k, v in mapError.items(): if (isinstance(e, k) or e.exception_list and all(isinstance(x, k) for x in