Invalid use of prepare-upload crashes git-ubuntu (Traceback)

Bug #2035205 reported by Paride Legovini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
New
Undecided
Unassigned

Bug Description

Using git-ubuntu 1.1-20-g2c19860 (edge), I noticed that calling

$ git ubuntu prepare-upload

leads to a traceback. That usage is clearly invalid, but git-ubuntu should give a useful help message instead of crashing (compare with what e.g. `git clone` does). The full traceback follows.

--

Traceback (most recent call last):
  File "/snap/git-ubuntu/1302/usr/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==1.1', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/1302/usr/lib/python3/dist-packages/gitubuntu/__main__.py", line 191, in main
    args = parser.parse_args()
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1780, in parse_args
    args, argv = self.parse_known_args(args, namespace)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1812, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 2021, in _parse_known_args
    stop_index = consume_positionals(start_index)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1977, in consume_positionals
    take_action(action, args)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1886, in take_action
    action(self, namespace, argument_values, option_string)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1171, in __call__
    subnamespace, arg_strings = parser.parse_known_args(arg_strings, None)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 1812, in parse_known_args
    namespace, args = self._parse_known_args(args, namespace)
  File "/snap/git-ubuntu/1302/usr/lib/python3.8/argparse.py", line 2047, in _parse_known_args
    ', '.join(required_actions))
TypeError: sequence item 0: expected str instance, NoneType found

Revision history for this message
Robie Basak (racb) wrote :

Sorry, yes, this is a known bug in Python as shipped in 20.04. Fixing it either means I need to SRU the fix to Focal, or update the snap to use core22.

Revision history for this message
Paride Legovini (paride) wrote :

Ugh, sorry for the dupe, I failed to find the earlier report.

Out of the two options I like updating the snap to core22 the better.

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.