Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Dziallas <sebastian@when.com>2010-06-25 15:43:59 (GMT)
committer Sebastian Dziallas <sebastian@when.com>2010-06-25 15:43:59 (GMT)
commit0b27bdc4cfa9396f0e21c99a89dd6896f99cb3f9 (patch)
tree3514e014ba2518740a760eaede3d0cc3e717553d
parent502a40d20e4c5097f08cb9a536c18c3769d59495 (diff)
show the correct profile url instead of cryptic numbers
-rw-r--r--extensions/cpsection/smolt/model.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/extensions/cpsection/smolt/model.py b/extensions/cpsection/smolt/model.py
index a08a502..41c023a 100644
--- a/extensions/cpsection/smolt/model.py
+++ b/extensions/cpsection/smolt/model.py
@@ -22,6 +22,8 @@ import subprocess
from gettext import gettext as _
import errno
+import linecache
+
from jarabe import config
_not_available = _('Not available')
@@ -34,8 +36,12 @@ def delete_profile():
os.remove(os.getenv("HOME") + '/.smolt/uuiddb.cfg')
def get_profile_url():
- profile_url = _read_file(os.getenv("HOME") + '/.smolt/uuiddb.cfg')
- if profile_url is None:
+ uuiddb = os.getenv("HOME") + '/.smolt/uuiddb.cfg'
+ if os.path.exists(uuiddb):
+ database = linecache.getline(uuiddb, 2)
+ profile = database[55:]
+ profile_url = 'http://www.smolts.org/client/show/' + profile
+ else:
profile_url = _not_available
return profile_url