diff options
author | Nikos Kouremenos <kourem@gmail.com> | 2005-11-22 14:24:10 +0300 |
---|---|---|
committer | Nikos Kouremenos <kourem@gmail.com> | 2005-11-22 14:24:10 +0300 |
commit | 8beb2e0266fd41f914e77d2a58ea7a617dc66c03 (patch) | |
tree | e388ce170373c329c8c4417dc95cb7609db37dd0 /scripts | |
parent | 5989b495d1d3b8c0457c57ccd705c025d68356c1 (diff) |
do not fail in windoz part 3 and last
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/migrate_logs_to_dot9_db.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/scripts/migrate_logs_to_dot9_db.py b/scripts/migrate_logs_to_dot9_db.py index 0c8d2c5df..df750a696 100755 --- a/scripts/migrate_logs_to_dot9_db.py +++ b/scripts/migrate_logs_to_dot9_db.py @@ -5,8 +5,13 @@ import sre from pysqlite2 import dbapi2 as sqlite if os.name == 'nt': - PATH_TO_LOGS_BASE_DIR = os.environ['appdata'] + '/Gajim/Logs' - PATH_TO_DB = os.path.expanduser('~/.gajim/logs.db') # database is called logs.db + try: + PATH_TO_LOGS_BASE_DIR = os.path.join(os.environ['appdata'], 'Gajim/Logs') + PATH_TO_DB = os.path.join(os.environ['appdata'], 'logs.db') # database is called logs.db + except KeyError: + # win9x + PATH_TO_LOGS_BASE_DIR = 'Logs' + PATH_TO_DB = 'logs.db' else: PATH_TO_LOGS_BASE_DIR = os.path.expanduser('~/.gajim/logs') PATH_TO_DB = os.path.expanduser('~/.gajim/logs.db') # database is called logs.db |