Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix and enhance download.py #16

Merged
merged 4 commits into from
Nov 2, 2018
Merged

Fix and enhance download.py #16

merged 4 commits into from
Nov 2, 2018

Conversation

bradschm
Copy link
Collaborator

@bradschm bradschm commented Nov 1, 2018

These patches will fix the issue where json is now delivered by default and you have EAs without scripts. It includes an option to prompt for password if one is omitted on the command line and some very basic error handling of the first call to the Jamf Pro Server.

I needed to add Accept: application/xml to the headers as the Jamf Pro server now serves up json by default. I had originally put in content-type: application/xml but I suppose that would only apply to uploads... I removed line 70 that contained a print statement that would cause the script to error if you have EAs without scripts. I was checking for the condition but if it matched the print would cause a failure. 

I added some light error handling on the first request to the Jamf Pro server. 

I also added some logic to prompt for a password if you omit the --password argument.
Bringing the tools copy up to speed with the last few commits
Removed the line that stated it would be removed from the root of the project in a future release as this is the new location.
@badstreff badstreff merged commit a06f75e into master Nov 2, 2018
@badstreff
Copy link
Owner

Awesome, thanks for the work on this!

@bradschm bradschm deleted the bradschm-patch-1 branch November 5, 2018 13:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants