Closed
Bug 1043524
Opened 11 years ago
Closed 11 years ago
mach help marionette yields UnboundLocalError: local variable 'group' referenced before assignment in mach/dispatcher.py
Categories
(Firefox Build System :: Mach Core, enhancement)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla34
People
(Reporter: mossop, Assigned: gps)
References
Details
(Keywords: regression)
Attachments
(1 file)
|
2.45 KB,
patch
|
jgraham
:
review+
|
Details | Diff | Splinter Review |
Error running mach:
['marionette-test', '--help']
The error occurred in mach itself. This is likely a bug in mach itself or a
fundamental problem with a loaded module.
Please consider filing a bug against mach by going to the URL:
https://bugzilla.mozilla.org/enter_bug.cgi?product=Core&component=mach
If filing a bug, please include the full output of mach, including this error
message.
The details of the failure are as follows:
UnboundLocalError: local variable 'group' referenced before assignment
File "/Users/dave/mozilla/source/trunk/python/mach/mach/main.py", line 340, in run
return self._run(argv)
File "/Users/dave/mozilla/source/trunk/python/mach/mach/main.py", line 386, in _run
args = parser.parse_args(argv)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1688, in parse_args
args, argv = self.parse_known_args(args, namespace)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1720, in parse_known_args
namespace, args = self._parse_known_args(args, namespace)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1908, in _parse_known_args
positionals_end_index = consume_positionals(start_index)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1885, in consume_positionals
take_action(action, args)
File "/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/argparse.py", line 1794, in take_action
action(self, namespace, argument_values, option_string)
File "/Users/dave/mozilla/source/trunk/python/mach/mach/dispatcher.py", line 103, in __call__
self._handle_subcommand_help(parser, command)
File "/Users/dave/mozilla/source/trunk/python/mach/mach/dispatcher.py", line 251, in _handle_subcommand_help
group.add_argument(*arg[0], **arg[1])
| Assignee | ||
Comment 1•11 years ago
|
||
I can reproduce this with |mach help marionette| and |mach marionette --help|. This is almost certainly a bug in the mach core. Weird.
| Assignee | ||
Updated•11 years ago
|
Summary: Cannot run marionette tests. → mach help marionette yields UnboundLocalError: local variable 'group' referenced before assignment in mach/dispatcher.py
| Assignee | ||
Comment 2•11 years ago
|
||
This is a regression from d53d1c6cdf13.
Depends on: 951733
Keywords: regression
| Assignee | ||
Comment 3•11 years ago
|
||
While I was here, I removed the try..except in favor of failing fast.
Before, we were only making cosmetic changes. Now, we actually need the
group for mach to work. It makes sense to stop ignoring errors.
This fixes a regression from d53d1c6cdf13 / bug 951733.
Attachment #8461727 -
Flags: review?(james)
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → gps
Status: NEW → ASSIGNED
Comment 4•11 years ago
|
||
Comment on attachment 8461727 [details] [diff] [review]
Define group variable is an existing parser is passed
Review of attachment 8461727 [details] [diff] [review]:
-----------------------------------------------------------------
Looks like it should work, although if _action_groups does change it might do so in such a way that indexing it does something, but the wrong thing, so we won't be failing fast. I don't see a good solution for that though. Well I guess you could check the type of the object you got back, but I think there's relatively little chance of this changing at least in python 2.x, so I'm not sure it's worth it.
Attachment #8461727 -
Flags: review?(james) → review+
| Assignee | ||
Comment 5•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla34
Updated•7 years ago
|
Product: Core → Firefox Build System
You need to log in
before you can comment on or make changes to this bug.
Description
•