diff options
Diffstat (limited to 'instance.py')
-rw-r--r-- | instance.py | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/instance.py b/instance.py new file mode 100644 index 0000000..bcee466 --- /dev/null +++ b/instance.py @@ -0,0 +1,22 @@ +import os + +from sugar import profile +from sugar import util + +class Instance: + key = profile.get_pubkey() + keyHash = util.sha_data(key) + + keyHashPrintable = util.printable_hash(keyHash) + + instancePath = None + + def __init__(self, ca): + self.__class__.instancePath = os.path.join(ca.get_activity_root(), "instance") + recreateTmp() + + +def recreateTmp(): + if (not os.path.exists(Instance.instancePath)): + os.makedirs(Instance.instancePath) + |