diff options
author | Yves Fischer <yvesf-git@xapek.org> | 2014-10-14 22:09:26 +0200 |
---|---|---|
committer | Yves Fischer <yvesf-git@xapek.org> | 2014-10-14 22:09:26 +0200 |
commit | 3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f (patch) | |
tree | 8d4679a6ece66ffa445b7558559b474827f05934 | |
parent | c6e43134c88a9afa3ec131cdf87e93273a72d886 (diff) | |
download | scripts-3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f.tar.gz scripts-3c6abfda4134079b52e41b8cc4bf20b15a6f6c2f.zip |
mkdir before move
-rwxr-xr-x | imdb-lookup/imdblookup.py | 2 |
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") |