Commit Graph

57 Commits

Author SHA1 Message Date
Greg Neagle 78383f5980 PyLint cleanups 2017-04-07 21:59:55 -07:00
Rick Heil 003f2489b9 Add exception handling to middleware import
Adds a simple try/except block to the middleware import to handle errors
that may result from bad middleware syntax. While this won't allow a
full run to happen, it will at least run preflight/postflight.
2017-03-02 13:49:18 -08:00
Greg Neagle 4053a0dbe7 Update copyright dates to 2017 2017-01-17 20:14:31 -08:00
Greg Neagle 24805bd99b Remove 'shebang' line from all Python modules that are not intended to be executed as scripts. This also causes my stupid editor to stop marking these files as executable. 2017-01-11 16:03:33 -08:00
Greg Neagle 2e905b0dea Once again remove executable bits that are getting set 2017-01-10 09:03:30 -08:00
Greg Neagle 846c2cb3d1 Convert munkicommon references to their new modules 2017-01-06 15:20:49 -08:00
Greg Neagle 41153d3a86 Remove execute bit from most munkilib/*.py files 2017-01-02 16:07:55 -08:00
Greg Neagle f338e5ead5 And the refactoring continues... 2017-01-01 15:16:07 -08:00
Greg Neagle 10a6950837 Consistent if __name__ == '__main__': bit for all munkilib submodules 2016-12-24 08:17:08 -08:00
Greg Neagle c386ede21c Move Memoize decorator to utils module 2016-12-17 09:24:15 -08:00
Greg Neagle 5a78efcb7b Move getDataFromURL function from updatecheck.py to fetch.py 2016-12-16 11:16:41 -08:00
Greg Neagle d822191720 Move updatecheck.getResourceIfChangedAtomically() to fetch.munki_resource() 2016-12-16 10:10:06 -08:00
Greg Neagle 74aed49f22 Reorganize exceptions reported by fetch.py (especially getResourceIfChangedAtomically and friends); updatecheck.checkServer rewritten to use fetch/gurl functions for the check (therefore using system proxies); exit updatecheck if there is a failure to retrieve any manifest (included_manifests as well). Addresses #560. Addresses issue reported on Slack with reaching repos hosted in the cloud from behind a web proxy. 2016-12-13 13:46:56 -08:00
Greg Neagle 4030c6b52f Doc string fix for fetch.get_url() 2016-12-12 14:14:53 -08:00
verycarefully 293a5aa832 Fix another lint error pep8 didn't catch. 2016-08-08 14:27:40 -04:00
verycarefully 9eda5213c0 Fix up more lint errors. 2016-08-08 14:23:58 -04:00
verycarefully 3ba5dbf23f Opt-in behavior to ignore system proxies. 2016-08-08 12:09:38 -04:00
Greg Neagle d42b6c04ef PyLint cleanups 2016-04-13 14:42:17 -07:00
Greg Neagle c4b98e24ff Adjust debug message when importing middleware 2016-04-13 14:07:25 -07:00
Greg Neagle e847454b60 More efficient middleware import 2016-04-13 14:05:16 -07:00
Greg Neagle 452c3e8f2a Safer import of middleware; add warning and debug output 2016-04-13 13:55:13 -07:00
Wade Robson 13f6782f9a function doesn't seem necessary anymore 2016-04-07 21:40:23 -07:00
Wade Robson 91bbd654f6 Import middleware once 2016-04-07 20:57:05 -07:00
Wade Robson fb6ac507ab Stop using sys to find munki dir. 2016-03-25 17:00:31 -07:00
Wade Robson 304853a6fc fixed crash due to no middleware 2016-03-21 22:16:35 -07:00
Wade Robson f8f9c94ee1 look for middleware*.py if present change options dict 2016-03-21 22:01:02 -07:00
Wade Robson a28a918feb Allow for the use of middleware 2016-03-20 19:40:40 -07:00
Greg Neagle 12d4f0d27e Update copyright info on files; remove abandoned tools from code/tools 2016-03-15 09:32:28 -07:00
Greg Neagle 437af40d2b PyLint cleanups 2015-12-09 11:53:14 -08:00
Greg Neagle c19f2d7936 Simplfy default user-agent header. 2015-12-09 11:41:30 -08:00
Greg Neagle fda740c046 Merge pull request #537 from mkuron/patch-1
Set User-Agent header in HTTP requests
2015-12-09 11:36:46 -08:00
Michael Kuron 918ebc64e4 Fix wrong line break 2015-11-19 09:52:26 +01:00
Michael Kuron 6f0a10f1da Cache default user agent 2015-11-19 09:48:52 +01:00
Michael Kuron 0bc12e57bf Python and CFNetwork version in User-Agent 2015-11-18 10:29:59 +01:00
Samuel Keeley 5c12185da4 Replace http://www.apache.org/licenses/LICENSE-2.0 with https://www.apache.org/licenses/LICENSE-2.0 2015-11-13 20:35:24 -08:00
Michael Kuron 088302be1d User-Agent header if other headers are specified 2015-11-13 15:35:29 +01:00
Michael Kuron d1f9475c54 header_dict_from_list documentation 2015-11-13 15:07:53 +01:00
Michael Kuron 4d36b6afb1 Set User-Agent header in HTTP requests
Previously Munki only set a User-Agent header on requests made from the appleupdates.py code. Everything else (catalog, manifest, package downloading) reported something like `"Python/2.7.5 CFNetwork/673.6 Darwin/13.4.0 (x86_64) (VMware7%2C1)"` to the server.
2015-11-13 14:54:54 +01:00
Graham Gilbert effe971249 Preference to Follow HTTP Recirects 2015-10-23 10:33:20 +01:00
Greg Neagle 423ec8b790 PyLint cleanup: replace all unused_foo variables with dummy_foo variables to make PyLint happy 2014-10-26 11:42:33 -07:00
Greg Neagle 38ebbf79ec Move more code from makekeychain to munkilib.keychain; attempt to build keychain on demand; should not need to run makekeychain at all 2014-10-22 11:59:32 -07:00
Greg Neagle e232c1b955 New attempt to use NSURLConnection + keychain to replace curl 2014-10-15 16:39:38 -07:00
Greg Neagle fddd138000 Bumping version to 1.0.0. Updated copyright dates. 2014-01-10 08:20:15 -08:00
Justin McWilliams ddfedc5e36 Display and log HTTP headers when package downloads fail. 2013-11-25 12:25:56 -05:00
Greg Neagle 6e3555820a Fix for curl buffering headers output in Mavericks, causing progress display not to function. 2013-11-15 12:14:31 -08:00
Michael Lynn 468924f2b3 Allow changing curl path for 10.9 curl client-side cert workaround 2013-11-07 14:21:19 -08:00
Greg Neagle 97d0d34f9b Initial support for checking for available licensed seats for uninstalled optional_installs 2013-07-16 15:21:29 -07:00
Greg Neagle 4b71ace130 Updated copyright info on all files with copyright info. 2013-01-28 11:55:09 -08:00
Rob Middleton d73bb1370c Keep parsing stdout after curl exits. Small downloads caused fetch.curl to stop looping before the ETag header was read. Thus the ETag xattr was often not written for small fast downloads. (Fix for issue 208, 204, 161) 2012-11-08 10:32:28 +11:00
Greg Neagle 34ab750460 Changes to allow curl to follow redirects when retreiving an Apple sucatalog; this is needed to support Lion Server's Software Update service. 2012-02-14 16:51:34 -08:00