Add doc string to installer.assertNoIdleSleep(); fix use of undefined 'cmd' variable.

This commit is contained in:
Greg Neagle
2012-08-15 15:41:22 -07:00
parent 80cec70612
commit 8ef3c3ec79
+3 -1
View File
@@ -1067,8 +1067,10 @@ def blockingApplicationsRunning(pkginfoitem):
def assertNoIdleSleep():
"""Runs `pmset noidle` to prevent idle sleep"""
cmd = ['/usr/bin/pmset', 'noidle']
try:
noIdleSleepAssertion = launchd.Job(['/usr/bin/pmset', 'noidle'])
noIdleSleepAssertion = launchd.Job(cmd)
noIdleSleepAssertion.start()
except launchd.LaunchdJobException, err:
munkicommon.display_warning(