From cf38d2fd74de96092b5ef13601ed8a3353ad5723 Mon Sep 17 00:00:00 2001 From: Christian Van Wambeke Date: Wed, 1 Aug 2018 11:25:23 +0200 Subject: [PATCH] fix sat package empty and developpers to developers --- AllTestLauncherSat.py | 6 +++--- commands/package.py | 4 ++-- src/debug.py | 16 ++++++++-------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/AllTestLauncherSat.py b/AllTestLauncherSat.py index 8b74f2f..6003382 100755 --- a/AllTestLauncherSat.py +++ b/AllTestLauncherSat.py @@ -77,7 +77,7 @@ sys.path.insert(0, cmdsdir) # TODO remove that _user = os.environ['USER'] # wambeke is christian at home -_developpers = ["christian", "wambeke",] # ...who wants +_developers = ["christian", "wambeke",] # ...who wants def errPrint(aStr): """stderr to avoid write in html or xml file log message""" @@ -148,10 +148,10 @@ def format_exception(msg, limit=None, trace=None): """ Format a stack trace and the exception information. as traceback.format_exception(), - with all traceback only if user in ._developpers + with all traceback only if user in ._developers """ etype, value, tb = sys.exc_info() - if _user in _developpers: + if _user in _developers: res = "\n" + msg if tb: res += "\nTraceback (most recent call last):\n" diff --git a/commands/package.py b/commands/package.py index bc7a3fa..99c8a1f 100644 --- a/commands/package.py +++ b/commands/package.py @@ -1444,7 +1444,7 @@ Please add it in file: filter_function = exclude_VCS_and_extensions # Add the files to the tarfile object - # res = add_files(tar, archive_name, d_files_to_add, logger, f_exclude=filter_function) + res = add_files(tar, archive_name, d_files_to_add, logger, f_exclude=filter_function) tar.close() except KeyboardInterrupt: logger.write(src.printcolors.printcError("\nERROR: forced interruption\n"), 1) @@ -1461,7 +1461,7 @@ Please add it in file: shutil.rmtree(tmp_local_working_dir) # have to decide some time - DBG.tofix("make shutil.rmtree('%s') effective" % tmp_working_dir, "", DBG.isDevelopper()) + DBG.tofix("make shutil.rmtree('%s') effective" % tmp_working_dir, "", DBG.isDeveloper()) # Print again the path of the package logger.write("\n", 2) diff --git a/src/debug.py b/src/debug.py index 2023d8a..13d7612 100755 --- a/src/debug.py +++ b/src/debug.py @@ -61,12 +61,12 @@ _debug = [False] #support push/pop for temporary activate debug outputs _user = os.environ['USER'] # wambeke is christian at home -_developpers = ["christian", "wambeke", "crouzet"] # crouzet, kloss ... +_developers = ["christian", "wambeke", "crouzet"] # crouzet, kloss ... -def isDevelopper(): - """if you are a developper, sometimes you want verbose traces etc.""" - res = _user in _developpers +def isDeveloper(): + """if you are a developer, sometimes you want verbose traces etc.""" + res = _user in _developers return res def indent(text, amount=2, ch=' '): @@ -127,10 +127,10 @@ def format_exception(msg, limit=None, trace=None): """ Format a stack trace and the exception information. as traceback.format_exception(), without color - with traceback only if (_debug) or (DBG._user in DBG._developpers) + with traceback only if (_debug) or (DBG._user in DBG._developers) """ etype, value, tb = sys.exc_info() - if (_debug[-1]) or (_user in _developpers): + if _debug[-1] or isDeveloper(): res = msg if tb: res += "\nTraceback (most recent call last):\n" @@ -147,10 +147,10 @@ def format_color_exception(msg, limit=None, trace=None): """ Format a stack trace and the exception information. as traceback.format_exception(), with color - with traceback only if (_debug) or (DBG._user in DBG._developpers) + with traceback only if _debug or isDeveloper()) """ etype, value, tb = sys.exc_info() - if (_debug[-1]) or (_user in _developpers): + if _debug[-1] or isDeveloper(): res = "" + msg if tb: res += "\nTraceback (most recent call last):\n" -- 2.39.2