git ubuntu remote: AttributeError: 'Namespace' object has no attribute 'directory'

Bug #1990650 reported by Paride Legovini
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Triaged
Medium
Unassigned

Bug Description

I happened to notice that `git ubuntu remote` leads to:

-------------------------

Traceback (most recent call last):
  File "/snap/git-ubuntu/988/usr/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==1.0', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/988/usr/lib/python3/dist-packages/gitubuntu/__main__.py", line 270, in main
    sys.exit(args.func(args))
  File "/snap/git-ubuntu/988/usr/lib/python3/dist-packages/gitubuntu/remote.py", line 90, in cli_main
    if args.directory is not None:
AttributeError: 'Namespace' object has no attribute 'directory'

-------------------------

I know that's an incomplete command, but it should print a help text (like `git ubuntu remote add` does, being an incomplete command too) instead of crashing.

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

Note: this happens with version 1.0-119-gbef5ef5 currently in edge.

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

Reproduced here too - thanks.

Changed in git-ubuntu:
status: New → Triaged
importance: Undecided → Medium
tags: added: remote ux
Revision history for this message
Paride Legovini (paride) wrote :

Maybe related: `git ubuntu prepare-upload` also crashes git-ubuntu:

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

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.