Skip to content
This repository has been archived by the owner on Jun 29, 2022. It is now read-only.

Editing non-existent profile causes traceback #16

Closed
chambridge opened this issue Jun 16, 2017 · 1 comment
Closed

Editing non-existent profile causes traceback #16

chambridge opened this issue Jun 16, 2017 · 1 comment
Assignees
Labels
Milestone

Comments

@chambridge
Copy link

candlepin#10

if we try to "rho profile edit" a profile that doesnt exist:

Traceback (most recent call last):
File "/home/adrian/src/rho/bin/rho", line 22, in
CLI().main()
File "/home/adrian/src/rho/src/rho/cli.py", line 95, in main
cmd.main()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 136, in main
self._do_command()
File "/home/adrian/src/rho/src/rho/clicommands.py", line 461, in _do_command
g.ranges = self.options.ranges
AttributeError: 'NoneType' object has no attribute 'ranges'
@chambridge chambridge added the bug label Jun 16, 2017
@chambridge chambridge added this to the Sprint 1 milestone Jun 30, 2017
@chambridge chambridge self-assigned this Jun 30, 2017
@chambridge
Copy link
Author

A trace back does not occur, but we incorrectly state:

$ rho profile edit --name=not_a_profile --hosts 192.168.50.[10:12] --auth test
Auths do not exist.

Current control flow sets both profile and auth to does not exist. Checks for profile and if found checks for auth. If profile doesn't exist it doesn't change the state of auth even if it does exist. Problem is it prints info about Auth does not exist first. Need to update error information flow.

@noahl noahl closed this as completed in 90403a3 Jun 30, 2017
noahl added a commit that referenced this issue Jun 30, 2017
Update code flow to check if profile does not exist first. Closes #16.
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant