Bug 725847 - NameError: name 'err' is not defined
Summary: NameError: name 'err' is not defined
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Beaker
Classification: Retired
Component: lab controller
Version: 0.6
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified vote
Target Milestone: future_maint
Assignee: Bill Peck
QA Contact:
URL:
Whiteboard:
Depends On: 718119
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-26 18:07 UTC by Alexander Todorov
Modified: 2012-08-22 23:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-22 23:05:07 UTC


Attachments (Terms of Use)

Description Alexander Todorov 2011-07-26 18:07:20 UTC
Description of problem:
Python traceback. 

# /var/lib/cobbler/triggers/sync/post/osversion.trigger --verbose 
Traceback (most recent call last):
  File "/var/lib/cobbler/triggers/sync/post/osversion.trigger", line 287, in ?
    print str(err)
NameError: name 'err' is not defined


The related code is:

    317 if __name__ == '__main__':
    318     try:
    319         opts, args = getopt.getopt(sys.argv[1:], "f")
    320         force = False
    321         for o, a in opts:
    322             if o == '-f':
    323                 force = True
    324     except:
    325         print str(err)
    326         usage()
    327         sys.exit(2)



Version-Release number of selected component (if applicable):
beaker-lab-controller-0.6.8-5.el5



How reproducible:
Always

Steps to Reproduce:
1. Run osversion.trigger --verbose
2.
3.
  
Actual results:
Python traceback

Expected results:
The --verbose option doesn't exist. Print user friendly error message.

Additional info:

Comment 1 Bill Peck 2011-07-27 15:23:45 UTC
While working on bz718119 I ended up fixing this as well.  So this will be fixed when 718119 goes out.


Note You need to log in before you can comment on or make changes to this bug.