diff options
author | Mats Wichmann <mats@linux.com> | 2021-05-05 14:37:22 (GMT) |
---|---|---|
committer | Mats Wichmann <mats@linux.com> | 2021-05-05 17:33:26 (GMT) |
commit | d7b1df36e2faf84c2b1789658300ceef90605997 (patch) | |
tree | 19d526d9ba9a771f305578f852fa2e6d01894f59 /SCons/Executor.py | |
parent | f046cf47ded412a0b96edb560ed7bb2daf72ccfb (diff) | |
download | SCons-d7b1df36e2faf84c2b1789658300ceef90605997.zip SCons-d7b1df36e2faf84c2b1789658300ceef90605997.tar.gz SCons-d7b1df36e2faf84c2b1789658300ceef90605997.tar.bz2 |
Fix some imports and other checker warnings
* Removed a number of imports reported as unused.
* Reorganize imports in a few places.
* Checker reported warnings problems ("Instantiating an exception,
but not raising it, has no effect"): serveral tool modules instantiated
a warning class thinking (?) it would issue the warning; changed these to
the standard use - calling the warn() function with the warnclass as an arg.
* Tool modules that were touched had the copyright header munging applied.
* Removed irritating "####" lines from gettext and msgfmt tools.
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'SCons/Executor.py')
-rw-r--r-- | SCons/Executor.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/SCons/Executor.py b/SCons/Executor.py index ee52151..492ebe3 100644 --- a/SCons/Executor.py +++ b/SCons/Executor.py @@ -25,12 +25,12 @@ import collections -import SCons.Debug -from SCons.Debug import logInstanceCreation import SCons.Errors import SCons.Memoize import SCons.Util from SCons.compat import NoSlotsPyPy +import SCons.Debug +from SCons.Debug import logInstanceCreation class Batch: """Remembers exact association between targets @@ -270,10 +270,8 @@ class Executor(object, metaclass=NoSlotsPyPy): return self.get_lvars()[targets_string] def set_action_list(self, action): - import SCons.Util if not SCons.Util.is_List(action): if not action: - import SCons.Errors raise SCons.Errors.UserError("Executor must have an action.") action = [action] self.action_list = action |