From 659821c7bb1aa03970db1c6d6953a6148f2d718f Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 21 May 2009 20:10:52 +0900 Subject: [PATCH] fix bug when APPDATA not defined --- ankiqt/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ankiqt/__init__.py b/ankiqt/__init__.py index 6984b19e0..2f7116a7e 100644 --- a/ankiqt/__init__.py +++ b/ankiqt/__init__.py @@ -89,8 +89,8 @@ def run(): os.makedirs(os.path.expanduser("~/.anki")) except: pass - if os.path.exists(oldConf) and not os.path.exists(oldConf.replace( - "config.db", "config.db.old")): + if (oldConf and os.path.exists(oldConf) and not os.path.exists( + oldConf.replace("config.db", "config.db.old"))): try: shutil.copy2(oldConf, os.path.expanduser("~/.anki/config.db"))