mirror of
https://github.com/munki/munki.git
synced 2026-05-12 15:28:51 -05:00
Add commentary around the caffeinator variable
This commit is contained in:
@@ -667,8 +667,12 @@ def run(only_unattended=False):
|
||||
Args:
|
||||
only_unattended: Boolean. If True, only do unattended_(un)install pkgs.
|
||||
"""
|
||||
# prevent sleep when idle so our installs complete
|
||||
# pylint: disable=unused-variable
|
||||
# prevent sleep when idle so our installs complete. The Caffeinator class
|
||||
# automatically releases the Power Manager assertion when the variable
|
||||
# goes out of scope, so we only need to create it and hold a reference
|
||||
caffeinator = powermgr.Caffeinator()
|
||||
# pylint: enable=unused-variable
|
||||
|
||||
managedinstallbase = prefs.pref('ManagedInstallDir')
|
||||
installdir = os.path.join(managedinstallbase, 'Cache')
|
||||
|
||||
Reference in New Issue
Block a user