summaryrefslogtreecommitdiff
path: root/imdb-lookup
diff options
context:
space:
mode:
authorYves Fischer <yvesf-git@xapek.org>2014-10-14 22:09:26 +0200
committerYves Fischer <yvesf-git@xapek.org>2014-10-14 22:09:26 +0200
commit3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f (patch)
tree8d4679a6ece66ffa445b7558559b474827f05934 /imdb-lookup
parentc6e43134c88a9afa3ec131cdf87e93273a72d886 (diff)
downloadscripts-3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f.tar.gz
scripts-3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f.zip
mkdir before move
Diffstat (limited to 'imdb-lookup')
-rwxr-xr-ximdb-lookup/imdblookup.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/imdb-lookup/imdblookup.py b/imdb-lookup/imdblookup.py
index 9655ce6..f6d7ff5 100755
--- a/imdb-lookup/imdblookup.py
+++ b/imdb-lookup/imdblookup.py
@@ -153,6 +153,8 @@ class UI(urwid.WidgetWrap):
def rename(*_):
urwid.disconnect_signal(self.btn_apply, u"click", rename)
try:
+ if not os.path.exists(info["filename"]):
+ os.mkdir(info["filename"])
shutil.move(self.filename, info["filename"])
except Exception as e:
self.view.set_focus("header")