Commit Graph
82 Commits
Author SHA1 Message Date
Greg Neagle 6b4ad647c4 Update copyright dates 2025-01-25 15:35:09 -08:00
Greg Neagle 6bb572b148 Add more detail to warning message when failing to import a middleware file 2024-04-17 08:56:01 -07:00
Greg Neagle 1850dbe077 Replace use of deprecated imp module with importlib.util for middleware and repo plugins 2024-02-20 10:46:32 -08:00
Greg Neagle 2b327569b4 Update copyright dates 2024-01-30 16:14:29 -08:00
Patrick Gallagher 4754ecc960 Add preference to ignore middleware (#1194)
* Add preference to ignore middleware

* Changed to suggested more pythonic code
2024-01-17 15:51:44 -08:00
Greg Neagle 767f64b12a Update copyright info 2023-02-22 09:59:22 -08:00
Greg Neagle 5ee0f5928a Update copyright dates 2022-05-10 16:09:38 -07:00
Greg Neagle 9d3e265cb8 Update copyright dates 2021-02-20 09:05:58 -08:00
Nate Walck e7ffb40518 Pass pkginfo through to middleware so additional context is available (#966)
* Pass pkginfo through to middleware so additional context is available

* fix typo

* Add pkginfo to get_url()
2020-01-12 12:41:45 -08:00
Greg Neagle 72a0535d0d Update Copyright dates 2020-01-01 08:53:37 -08:00
Elliot Jordan 21766484f7 Only attempt decode if xattr_hash exists (#969)
Resolves #968
2020-01-01 08:34:19 -08:00
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