[hamster-applet] typo in the brain. fixes bug 619960



commit f1552c1586d8ad0c6f4ce1f4c8437c62b1687ae8
Author: Toms Bauģis <toms baugis gmail com>
Date:   Fri May 28 17:55:11 2010 +0100

    typo in the brain. fixes bug 619960

 src/hamster/configuration.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/configuration.py b/src/hamster/configuration.py
index 2381273..cdc7a1c 100644
--- a/src/hamster/configuration.py
+++ b/src/hamster/configuration.py
@@ -52,12 +52,12 @@ class RuntimeStore(Singleton):
 
 
     def __init__(self):
-          # Makefile.in shouldn't be in the final install
           try:
                import defs
                self.data_dir = os.path.join(defs.DATA_DIR, "hamster-applet")
                self.version = defs.VERSION
           except:
+               # if defs is not there, we are running from sources
                module_dir = os.path.dirname(os.path.realpath(__file__))
                self.data_dir = os.path.join(module_dir, '..', '..', 'data')
                self.version = "uninstalled"
@@ -71,7 +71,7 @@ class RuntimeStore(Singleton):
 
           # move database to ~/.local/share/hamster-applet
           if os.path.exists(old_db_file):
-              db_path = os.path.split(os.path.realpath(new_db_file), 1)[0]
+              db_path = os.path.dirname(os.path.realpath(new_db_file))
               if not os.path.exists(db_path):
                   try:
                       os.makedirs(db_path, 0744)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]