mirror of
https://github.com/beetbox/beets.git
synced 2026-02-25 00:32:50 +01:00
Catch failed folder creation
This commit is contained in:
parent
0d8a0d3fad
commit
f64df80974
1 changed files with 6 additions and 1 deletions
|
|
@ -165,7 +165,12 @@ class IPFSPlugin(BeetsPlugin):
|
|||
lib_root = os.path.dirname(lib.path)
|
||||
remote_libs = lib_root + "/remotes"
|
||||
if not os.path.exists(remote_libs):
|
||||
os.makedirs(remote_libs)
|
||||
try:
|
||||
os.makedirs(remote_libs)
|
||||
except OSError as e:
|
||||
msg = "Could not create {0}. Error: {1}".format(remote_libs, e)
|
||||
self._log.error(msg)
|
||||
return False
|
||||
path = remote_libs + "/" + lib_name + ".db"
|
||||
cmd = "ipfs get {0} -o".format(_hash).split()
|
||||
cmd.append(path)
|
||||
|
|
|
|||
Loading…
Reference in a new issue