diff options
author | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-15 03:51:16 (GMT) |
---|---|---|
committer | erikb <erikb@574bc980-5f2d-0410-acbc-c8f9f0eb14e0> | 2007-11-15 03:51:16 (GMT) |
commit | e6dc6339ce3568fe5fc6cf25bb803c0cb5feda8b (patch) | |
tree | 6ee1911b4f0239d3f112e93d0f8d7e3b8df2d729 /instance.py | |
parent | 25395014e74856ac77750b85ce220606e7f7b3af (diff) |
v40 changes
git-svn-id: http://mediamods.com/public-svn/camera-activity/Record.activity@900 574bc980-5f2d-0410-acbc-c8f9f0eb14e0
Diffstat (limited to 'instance.py')
-rw-r--r-- | instance.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/instance.py b/instance.py index 620f47e..44a1642 100644 --- a/instance.py +++ b/instance.py @@ -21,6 +21,7 @@ class Instance: instanceId = None tmpPath = None + instancePath = None def __init__(self, ca): self.__class__.instanceId = ca._activity_id @@ -28,6 +29,9 @@ class Instance: self.__class__.tmpPath = os.path.join( tmpPath, str(self.__class__.instanceId)) recreateTmp() + self.__class__.instancePath = os.path.join( ca.get_activity_root(), "instance" ) + recreateInstance() + def recreateTmp(): #todo: figure out how to have multiple spaces for my media @@ -36,4 +40,12 @@ def recreateTmp(): # shutil.rmtree(Instance.tmpPath) if (not os.path.exists(Instance.tmpPath)): os.makedirs(Instance.tmpPath) - record.Record.log.debug("Instance.tmpPath:" + str(Instance.tmpPath))
\ No newline at end of file + + +def recreateInstance(): + #todo: figure out how to have multiple spaces for my media + #problem is, if new instance is created, with this code, it clears the whole tmp directory! + #if (os.path.exists(Instance.tmpPath)): + # shutil.rmtree(Instance.tmpPath) + if (not os.path.exists(Instance.instancePath)): + os.makedirs(Instance.instancePath)
\ No newline at end of file |