Greg Neagle
6730fbb74a
Fix some bytes vs unicode handling for Python 3 compatibility
2019-06-23 17:48:03 -07:00
Greg Neagle
0dddb5dbd5
Lots of Python 3 compatibility changes for munkilib
2019-06-22 22:19:39 -07:00
Greg Neagle
15df290ee9
Python 3 compatibility for fetch.py
2019-06-22 18:55:43 -07:00
Greg Neagle
3768eb78cb
PyLint cleanups
2019-05-05 11:14:04 -07:00
Greg Neagle
df60207145
Add 'from __future__ import absolute_import' to all files to enforce Python3-style imports
2019-05-03 21:34:56 -07:00
Greg Neagle
531d99a01a
Convert all print statements to Python3-compatible print functions
2019-05-03 19:47:37 -07:00
Elliot Jordan
2ad27ff411
Align except clauses with PEP 3110 ( #933 )
...
This should work for Python 2.6+, including 3.
https://www.python.org/dev/peps/pep-3110/#compatibility-issues
2019-05-03 15:05:13 -07:00
Elliot Jordan
d14c4304ea
Various typo fixes and spelling corrections ( #907 )
...
* Fixed "No Comment" typo in strings files
* Fix "problem updates" typo
* Fix "caught" typo
* Fix "pseudo" typo
* Fix "instantiated" typo
* Fix "explicitly" typo
* Fix "osascript" typo
* Spelling fixes and various other corrections
* Fix two more instances of "Logput"
* Fixed a few remaining spelling issues in python files
* Fix "because" typo
PR also submitted upstream to the Murky project for the same correction.
* Fix name of associated app
* Additional spelling corrections in comments/docstrings
2019-02-14 08:30:43 -08:00
Greg Neagle
125e9c6471
Precaching improvements so that managedsoftwareupdate won't remove partially precached items, and that precache_agent is stopped when managedsoftwareupdate does an updatecheck
2019-01-09 08:23:00 -08:00
Greg Neagle
918d0b7391
Update copyright dates
2019-01-02 10:31:50 -08:00
Greg Neagle
ce6bc92dce
Safer determination of short hostname; Raise a GurlError instead of allowing an unhandled exception if a download rename fails
2018-08-15 13:48:29 -07:00
Greg Neagle
1428c40d06
Update copyright notices to include 2018
2018-01-20 08:46:22 -08:00
Greg Neagle
15e677d5e4
Update some Gurl object method defintions for better compatibility with newer versions of PyObjC
2017-12-16 09:21:51 -08:00
Greg Neagle
c55cb84c3d
Avoid calling system_profiler when importing munkilib/fetch, which then means faster startup of managedsoftwareupdate
2017-08-31 15:00:42 -07:00
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