Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2008-11-22 17:57:09 (GMT)
committer Daniel Drake <dsd@laptop.org>2008-11-22 17:57:09 (GMT)
commit9ca6ac3b7dc1becd875ec747b3418e9a71612c6a (patch)
treed962d1629523315c058ed6068612fe61a6e6fef9
parent0d9bd9f868b70fadb30dc761e22002b0f5c28b36 (diff)
sugar.util sha_data API change
-rw-r--r--instance.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/instance.py b/instance.py
index 0aac3ad..1ab5407 100644
--- a/instance.py
+++ b/instance.py
@@ -10,7 +10,12 @@ import record
class Instance:
key = profile.get_pubkey()
- keyHash = util._sha_data(key)
+ if hasattr(util, '_sha_data'):
+ # sugar-0.82 and previous
+ keyHash = util._sha_data(key)
+ else:
+ keyHash = util.sha_data(key)
+
keyHashPrintable = util.printable_hash(keyHash)
nickName = profile.get_nick_name()
@@ -40,4 +45,5 @@ def recreateTmp():
def recreateData():
if (not os.path.exists(Instance.dataPath)):
- os.makedirs(Instance.dataPath) \ No newline at end of file
+ os.makedirs(Instance.dataPath)
+