Changeset 6542 for main/waeup.sirp/trunk/src/waeup
- Timestamp:
- 23 Jul 2011, 10:22:10 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
r6499 r6542 269 269 def _getStoragePath(self): 270 270 """Get the directory, where batch import files are stored. 271 272 If the path does not exist yet, it is created. The path is 273 normally ``accesscodes/imports`` below the datacenter storage 274 path (see :data:`waeup.sirp.accesscodes.Datacenter.storage`). 271 275 """ 272 276 site = grok.getSite() … … 274 278 ac_storage = os.path.join(storagepath, 'accesscodes') 275 279 import_path = os.path.join(ac_storage, 'imports') 276 if not os.path.exists(import_path): 277 os.mkdir(import_path) 280 for path in [ac_storage, import_path]: 281 if not os.path.exists(path): 282 os.mkdir(path) 283 site.logger.info('created path %s' % path) 278 284 return import_path 279 285 280 286 def addBatch(self, batch): 281 """Add a batch.287 """Add an already created `batch`. 282 288 """ 283 289 batch.num = self.getNum(batch.prefix)
Note: See TracChangeset for help on using the changeset viewer.