Merge branch 'lsof_quote_fix' of https://github.com/rgrinberg/Airtime into devel

This commit is contained in:
martin 2012-11-23 16:18:23 -05:00
commit 735640d40b
1 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ import os
import math import math
import wave import wave
import contextlib import contextlib
import shutil import shutil, pipes
import re import re
import sys import sys
import hashlib import hashlib
@ -162,7 +162,7 @@ def walk_supported(directory, clean_empties=False):
def file_locked(path): def file_locked(path):
cmd = "lsof %s" % path cmd = "lsof %s" % (pipes.quote(path))
f = Popen(cmd, shell=True, stdout=PIPE).stdout f = Popen(cmd, shell=True, stdout=PIPE).stdout
return bool(f.readlines()) return bool(f.readlines())