Uploaded image for project: 'Data Management'
  1. Data Management
  2. DM-606

code glitches in sconsUtils

    Details

    • Type: Story
    • Status: Done
    • Priority: Minor
    • Resolution: Done
    • Fix Version/s: None
    • Component/s: sconsUtils
    • Labels:
      None
    • Templates:
    • Team:
      Alert Production

      Description

      In looking over sconsUtils for ticket #2976 my linter found some errors in state.py. I suspect the code works anyway due to extra names being imported, but it's surprising that it works.

      It is not clear that ARGUMENTS should be defined in the following:

          opt = "export"
          if SCons.Script.ARGUMENTS.has_key(opt):
              for kv in ARGUMENTS[opt].split(','):

      utils is not imported; the code should use the global "log"

          utils.log.fail("Unrecognised compiler:%s" % env['cc'])

      Also, it is not obvious that the global "log" will always be set (in which case it will be None and all logging statements will fail). But given the fact that this code works, and the failure is obvious is log is None, I'm guessing it is not worth putting in a guard for that.

        Attachments

          Container Issues

            Activity

              People

              • Assignee:
                rowen Russell Owen
                Reporter:
                rowen Russell Owen
                Reviewers:
                Simon Krughoff
                Watchers:
                Jim Bosch, Robert Lupton, Russell Owen, Simon Krughoff
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel