[hamster-applet] realpath is much cooler than abspath :)



commit 31fd0ea7cc0e126093a63891b1c1f82cc4f5e874
Author: Toms Bauģis <toms baugis gmail com>
Date:   Sat Jun 5 16:36:36 2010 +0100

    realpath is much cooler than abspath :)

 src/hamster/stuff.py |    2 +-
 tests/stuff_test.py  |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hamster/stuff.py b/src/hamster/stuff.py
index 8f8b797..6ad646d 100644
--- a/src/hamster/stuff.py
+++ b/src/hamster/stuff.py
@@ -47,7 +47,7 @@ def setup_i18n():
     # localedir/language.mo at it's best (after build)
     # and there does not seem to be any way to run straight from sources
     if defs:
-        locale_dir = os.path.abspath(os.path.join(defs.DATA_DIR, "locale"))
+        locale_dir = os.path.realpath(os.path.join(defs.DATA_DIR, "locale"))
 
         for module in (locale,):
             module.bindtextdomain('hamster-applet', locale_dir)
diff --git a/tests/stuff_test.py b/tests/stuff_test.py
index 50dae2b..6d602fa 100644
--- a/tests/stuff_test.py
+++ b/tests/stuff_test.py
@@ -1,6 +1,6 @@
 import sys, os.path
 # a convoluted line to add hamster module to absolute path
-sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "..")))
+sys.path.insert(0, os.path.realpath(os.path.join(os.path.dirname(__file__), "..")))
 
 import unittest
 from hamster import stuff



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