Minor bug fixes and code cleanup.

git-svn-id: http://munki.googlecode.com/svn/trunk@298 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
Greg Neagle
2009-10-30 15:27:43 +00:00
parent 13cdb31c28
commit b2ef8d288f
2 changed files with 6 additions and 5 deletions
+2 -2
View File
@@ -231,8 +231,8 @@ def osascript(osastring):
print >>sys.stderr, "Error: ", err
if out:
return out.decode('UTF-8').rstrip("\n")
# dmg helpers
def mountdmg(dmgpath):
+4 -3
View File
@@ -97,9 +97,10 @@ def getPIDforProcessName(processname):
if not line and (p.poll() != None):
break
line = line.rstrip('\n');
(pid, proc) = line.split(None,1)
if proc.find(processname) != -1:
return str(pid)
if line:
(pid, proc) = line.split(None,1)
if proc.find(processname) != -1:
return str(pid)
return 0