Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 186291 - pybugz traceback when doing -h on subcommand
Summary: pybugz traceback when doing -h on subcommand
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: High normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-07-23 02:53 UTC by SpanKY
Modified: 2007-09-01 19:25 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
pybugz-gettext.patch (pybugz-gettext.patch,388 bytes, patch)
2007-08-14 14:09 UTC, Santiago M. Mola (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description SpanKY gentoo-dev 2007-07-23 02:53:04 UTC
www-client/pybugz-0.7.0

$ bugz post -h
Traceback (most recent call last):
  File "/usr/bin/bugz", line 4, in ?
    bugz.main()
  File "/usr/lib64/python2.4/site-packages/bugz.py", line 1653, in main
    gopts, gargs = global_parser.parse_args()
  File "/usr/lib64/python2.4/optparse.py", line 1277, in parse_args
    stop = self._process_args(largs, rargs, values)
  File "/usr/lib64/python2.4/site-packages/bugz.py", line 465, in _process_args
    self._process_short_opts(rargs, values)
  File "/usr/lib64/python2.4/site-packages/bugz.py", line 432, in _process_short_opts
    self.error(_("%s option requires an argument") % opt)
NameError: global name '_' is not defined
Comment 1 Santiago M. Mola (RETIRED) gentoo-dev 2007-08-14 14:09:54 UTC
Created attachment 128073 [details, diff]
pybugz-gettext.patch

Adding gettext support solves the problem. Attaching patch for discussion.
Comment 2 William Hubbs gentoo-dev 2007-09-01 18:44:22 UTC
(In reply to comment #1)
> Created an attachment (id=128073) [edit]
> pybugz-gettext.patch
> Adding gettext support solves the problem. Attaching patch for discussion.

I don't think gettext support is the real issue here.

When I fixed bug #188846 in svn, I noticed that the behavior of this bug changed.

Now, everything seems to work unless you give the -H or -P options without an argument.

I've looked at the code for setting these options up, but I am unable to see what needs to be changed so they give the same error message as other options that require arguments.

Coldwind, can you take a look and attach a new patch to fix these options?
Comment 3 William Hubbs gentoo-dev 2007-09-01 19:25:40 UTC
I removed GetText support for now, so this is fixed in svn.  Thanks Coldwind. :-)