[hamster-applet] Dropped verbosity, reversed local checkout check



commit e2fb90c118b1a2223047f6a1260c0d12db503ac2
Author: Patryk Zawadzki <patrys pld-linux org>
Date:   Tue Sep 1 11:21:33 2009 +0200

    Dropped verbosity, reversed local checkout check
    
    This was done in order to allow hamster to run when installed with
    /home/* prefix.

 hamster/configuration.py |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/hamster/configuration.py b/hamster/configuration.py
index a8199f9..7342e8c 100644
--- a/hamster/configuration.py
+++ b/hamster/configuration.py
@@ -41,15 +41,13 @@ class RuntimeStore(Singleton):
     trace_sql = False
 
     def __init__(self):
-        print "Doing init!"
-
         gettext.install("hamster-applet", unicode = True)
 
         # Typically shared data dir is /usr/share/hamster-applet
-        if os.path.realpath(__file__).startswith('/home/'):
-            data_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'data'))
-        else:
+        if os.path.realpath(__file__).startswith(defs.PYTHONDIR):
             data_dir = os.path.join(defs.DATA_DIR, "hamster-applet")
+        else:
+            data_dir = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', 'data'))
         self.data_dir = data_dir
         self.dispatcher = Dispatcher()
         self.storage = Storage(self.dispatcher)



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