Skip to content

Crash if list command returns empty set of patches #11

Description

@kvalo

If there are no patches available pwcli crashes:

test-branch@pwcli-stub-Ta651k > 
potku:~/personal/patchwork/src/pwcli$ ./run_stub 
Connecting to http://localhost:8106/
User          : test (7477, 30052, 118371)
Projects      : stub-test
Tree          : pwcli-stub-Hsbz4D
Branch        : test-branch
New           : 18
Review        : 7
Upstream      : 0
Deferred      : 5
Total         : 30
test-branch@pwcli-stub-Hsbz4D > list -n doesnotexist

test-branch@pwcli-stub-Hsbz4D > review 2
Traceback (most recent call last):
  File "/home/kvalo/projects/personal/patchwork/src/pwcli/pwcli", line 2217, in <module>
    main()
  File "/home/kvalo/projects/personal/patchwork/src/pwcli/pwcli", line 2214, in main
    pwcli.run_shell()
  File "/home/kvalo/projects/personal/patchwork/src/pwcli/pwcli", line 2002, in run_shell
    args.func(args)
  File "/home/kvalo/projects/personal/patchwork/src/pwcli/pwcli", line 1664, in cmd_review
    patches = self.get_patches_from_ids(args.ids)
  File "/home/kvalo/projects/personal/patchwork/src/pwcli/pwcli", line 958, in get_patches_from_ids
    raise Exception('No patches available, doing nothing.')
Exception: No patches available, doing nothing.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions