handle missing directory
This commit is contained in:
parent
72995c0d3a
commit
658c84d5df
@ -99,12 +99,14 @@ def mountTorrent(magnet):
|
|||||||
o.communicate() # wait for it to finish
|
o.communicate() # wait for it to finish
|
||||||
|
|
||||||
def umountTorrent():
|
def umountTorrent():
|
||||||
|
if os.path.isdir(fuseTorrentLocation):
|
||||||
o = subprocess.Popen([
|
o = subprocess.Popen([
|
||||||
"fusermount",
|
"fusermount",
|
||||||
"-u", fuseTorrentLocation
|
"-u", fuseTorrentLocation
|
||||||
])
|
])
|
||||||
o.communicate() # wait for it to finish
|
o.communicate() # wait for it to finish
|
||||||
os.rmdir(fuseTorrentLocation)
|
os.rmdir(fuseTorrentLocation)
|
||||||
|
if os.path.isdir(btfsDataLocation):
|
||||||
shutil.rmtree(btfsDataLocation)
|
shutil.rmtree(btfsDataLocation)
|
||||||
|
|
||||||
def getTorrentMedia():
|
def getTorrentMedia():
|
||||||
|
Loading…
x
Reference in New Issue
Block a user