Incorrect error thrown when running setup.py with a non-existent config file

Bug #499712 reported by Philip Peitsch
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Quickly
Fix Released
Undecided
Unassigned

Bug Description

There is a missing import sys command in the setup.py. This means that if an install is attempted with the setup.py, an exception is thrown by missing the sys.exit() command, rather than just notifying that the config cannot be found.

The output of the incorrect version AFTER REMOVING THE demoprojectconfig.py file is:
~$ python setup.py install
running install
ERROR: Can't find demoproject/demoprojectconfig.py
Traceback (most recent call last):
  File "setup.py", line 92, in <module>
    cmdclass={'install': InstallAndUpdateDataDirectory}
  File "/usr/lib/python2.6/dist-packages/DistUtilsExtra/auto.py", line 92, in setup
    distutils.core.setup(**attrs)
  File "/usr/lib/python2.6/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/usr/lib/python2.6/distutils/dist.py", line 975, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python2.6/distutils/dist.py", line 995, in run_command
    cmd_obj.run()
  File "setup.py", line 72, in run
    previous_value = update_data_path(self.prefix + '/share/demoproject/')
  File "setup.py", line 43, in update_data_path
    sys.exit(1)

With the fix in place, the behaviour becomes
~$ python setup.py install
running install
ERROR: Can't find demoproject/demoprojectconfig.py

The fix is rather straightforward, being to import the sys module in the setup.py file.

Related branches

description: updated
Changed in quickly:
status: New → Triaged
Changed in quickly:
status: Triaged → Fix Committed
milestone: none → 0.4
Changed in quickly:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.