mirror of
https://github.com/munki/munki.git
synced 2026-04-22 04:28:21 -05:00
pylint cleanup
git-svn-id: http://munki.googlecode.com/svn/trunk@656 a4e17f2e-e282-11dd-95e1-755cbddbdd66
This commit is contained in:
@@ -38,10 +38,11 @@ import subprocess
|
||||
def valid_plist(path):
|
||||
'''Uses plutil to check a plist for validity'''
|
||||
cmd = ['/usr/bin/plutil', '-lint', '-s' , path]
|
||||
p = subprocess.Popen(cmd, shell=False, bufsize=1, stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = p.communicate()
|
||||
if p.returncode == 0:
|
||||
proc = subprocess.Popen(cmd, shell=False, bufsize=1,
|
||||
stdin=subprocess.PIPE,
|
||||
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
(out, err) = proc.communicate()
|
||||
if proc.returncode == 0:
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user