Changeset 7568 for main/waeup.sirp/trunk/src
- Timestamp:
- 2 Feb 2012, 21:09:31 (13 years ago)
- Location:
- main/waeup.sirp/trunk/src/waeup/sirp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/datacenter.py
r7321 r7568 26 26 import grok 27 27 from datetime import datetime 28 from zope.component import getUtility 28 29 from zope.component.interfaces import ObjectEvent 29 30 from waeup.sirp.interfaces import (IDataCenter, IDataCenterFile, 30 IDataCenterStorageMovedEvent) 31 IDataCenterStorageMovedEvent, 32 ISIRPUtils) 31 33 from waeup.sirp.utils.helpers import copy_filesystem_tree 32 34 from waeup.sirp.utils.logger import Logger … … 36 38 """ 37 39 grok.implements(IDataCenter) 38 storage = os.path.join(os.path.dirname(__file__), 'files')39 40 40 41 logger_name = 'waeup.sirp.${sitename}.datacenter' … … 43 44 def __init__(self, *args, **kw): 44 45 super(DataCenter, self).__init__(*args, **kw) 46 self.storage = getUtility(ISIRPUtils).storage() 45 47 self._createSubDirs() 46 48 -
main/waeup.sirp/trunk/src/waeup/sirp/interfaces.py
r7485 r7568 143 143 """A collection of methods which are subject to customization. 144 144 """ 145 146 def storage(): 147 """Return the initial storage path of the data center. 148 """ 149 145 150 def sendContactForm( 146 151 from_name,from_addr,rcpt_name,rcpt_addr, -
main/waeup.sirp/trunk/src/waeup/sirp/utils/utils.py
r7477 r7568 18 18 """General helper utilities for SIRP. 19 19 """ 20 import os 20 21 import grok 21 22 import string … … 38 39 """ 39 40 grok.implements(ISIRPUtils) 41 42 def storage(self): 43 """Return the initial storage path of the data center. 44 """ 45 return os.path.dirname(__file__).replace('utils','files') 40 46 41 47 def sendContactForm(self,from_name,from_addr,rcpt_name,rcpt_addr,
Note: See TracChangeset for help on using the changeset viewer.