From 1de35c6eaf67f127d00ae08402ed5838a5380fa6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=2E=C3=87a=C4=9Flar=20Onur?= Date: Wed, 25 Jan 2006 23:37:09 +0000 Subject: [PATCH] use run_batch for shelltools.system and fix string formatting --- pisi/actionsapi/shelltools.py | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/pisi/actionsapi/shelltools.py b/pisi/actionsapi/shelltools.py index 36d2e18a..6821305d 100644 --- a/pisi/actionsapi/shelltools.py +++ b/pisi/actionsapi/shelltools.py @@ -29,6 +29,7 @@ import pisi.actionsapi import pisi.actionsapi.get from pisi.actionsapi import error +from pisi.util import run_batch def can_access_file(sourceFile): '''test the existence of file''' @@ -198,15 +199,5 @@ def dirName(sourceFile): return os.path.dirname(sourceFile) def system(command): - #FIXME: might be better to merge this with util.run_batch - #FIXME: String formatting - 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() + command = command.replace(" ", "") + run_batch(command)