use run_batch for shelltools.system and fix string formatting
This commit is contained in:
@@ -29,6 +29,7 @@ import pisi.actionsapi
|
|||||||
import pisi.actionsapi.get
|
import pisi.actionsapi.get
|
||||||
|
|
||||||
from pisi.actionsapi import error
|
from pisi.actionsapi import error
|
||||||
|
from pisi.util import run_batch
|
||||||
|
|
||||||
def can_access_file(sourceFile):
|
def can_access_file(sourceFile):
|
||||||
'''test the existence of file'''
|
'''test the existence of file'''
|
||||||
@@ -198,15 +199,5 @@ def dirName(sourceFile):
|
|||||||
return os.path.dirname(sourceFile)
|
return os.path.dirname(sourceFile)
|
||||||
|
|
||||||
def system(command):
|
def system(command):
|
||||||
#FIXME: might be better to merge this with util.run_batch
|
command = command.replace(" ", "")
|
||||||
#FIXME: String formatting
|
run_batch(command)
|
||||||
command = command.replace(" ", " ")
|
|
||||||
ctx.ui.debug(_('executing %s') % command)
|
|
||||||
p = os.popen(command)
|
|
||||||
while 1:
|
|
||||||
line = p.readline()
|
|
||||||
if not line:
|
|
||||||
break
|
|
||||||
ctx.ui.debug(line[:-1])
|
|
||||||
|
|
||||||
return p.close()
|
|
||||||
|
|||||||
Reference in New Issue
Block a user