Relocated the import of the 'shlex' module to other module imports for clarity

Minor modification to construction of 'cmd' in 'def makePkgInfo'
This commit is contained in:
Heig Gregorian
2012-05-01 08:59:39 -07:00
parent 1e0d0842c7
commit 467899b5bd
+2 -2
View File
@@ -28,6 +28,7 @@ import os
import optparse
import subprocess
import time
import shlex
#from distutils import version
from munkilib import munkicommon
@@ -412,7 +413,7 @@ def makePkgInfo(item_path,options=[]):
if options:
cmd = [makepkginfo_path] + options + [item_path]
else:
cmd = [makepkginfo_path] + [item_path]
cmd = [makepkginfo_path, item_path]
proc = subprocess.Popen(cmd,
bufsize=-1, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
@@ -603,7 +604,6 @@ def main():
# generate pkginfo for the item
makepkginfo_options=[]
if options.makepkginfo_options:
import shlex
makepkginfo_options = shlex.split(options.makepkginfo_options)
pkginfo = makePkgInfo(installer_item,makepkginfo_options)