diff options
Diffstat (limited to 'instance.py')
-rw-r--r-- | instance.py | 10 |
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) + |