summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-07-28 19:13:39 +0300
committerAlon Levy <alevy@redhat.com>2011-07-28 19:13:39 +0300
commit19732eddb2e2c177800052a7bd9474a9bb049bab (patch)
treecacef9b201267c127a254a69f1b2e157189c89d0
parent9405d0bfb25625087688955a62fe5bf03933952f (diff)
lsof fix?
-rwxr-xr-xspice23
1 files changed, 2 insertions, 1 deletions
diff --git a/spice2 b/spice2
index 9e1025c..2ea73e0 100755
--- a/spice2
+++ b/spice2
@@ -207,7 +207,8 @@ def set_title(x):
sys.stdout.write("\033]0;%s\007" % str(x))
def file_in_use(x):
- return not os.system('lsof -t %s > /dev/null' % x)
+ return not subprocess.call(['lsof', '-t', x],
+ stdout=subprocess.PIPE, stderr=subprocess.PIPE)
def oldness(f):
if not os.path.exists(f):