Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

[Enhancement] More graceful "Username or Password is incorrect" error. #13

Open
rougegoat opened this issue Oct 30, 2015 · 1 comment
Open

Comments

@rougegoat
Copy link

I recently changed my password, but forgot to update jss_helper's plist. As a result, instead of seeing something like

$ jss_helper --ssl promote
error: bad username and/or password

I saw something like

$ jss_helper --ssl promote
Traceback (most recent call last):
  File "/usr/local/bin/jss_helper", line 107, in <module>
    main()
  File "/usr/local/bin/jss_helper", line 100, in main
    args.func(args)
  File "/usr/local/bin/jss_helper_lib/actions.py", line 541, in promote
    all_packages = jss_connection.Package()
  File "/Library/Python/2.7/site-packages/python_jss-1.4.0-py2.7.egg/jss/jamf_software_server.py", line 589, in Package
    return self.factory.get_object(jssobjects.Package, data)
  File "/Library/Python/2.7/site-packages/python_jss-1.4.0-py2.7.egg/jss/jamf_software_server.py", line 734, in get_object
    return self.get_list(obj_class, data, subset)
  File "/Library/Python/2.7/site-packages/python_jss-1.4.0-py2.7.egg/jss/jamf_software_server.py", line 760, in get_list
    result = self.jss.get(url)
  File "/Library/Python/2.7/site-packages/python_jss-1.4.0-py2.7.egg/jss/jamf_software_server.py", line 202, in get
    error_handler(JSSGetError, response)
  File "/Library/Python/2.7/site-packages/python_jss-1.4.0-py2.7.egg/jss/tools.py", line 87, in error_handler
    raise exception

At a glance, there's no clear way to see that this is an error caused by a bad password. Is there any way to make this a bit easier to read at a glance?

Definitely low priority enhancement at best.

@sheagcraig
Copy link
Collaborator

Good plan. I've written some helper code for setting up preferences for python-jss, so I'll add that add in as well.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants