devtools/__init__.py
branchstable
changeset 9235 3eb8d65824f5
parent 8930 6a02be304486
child 9252 01bca75ee8bd
child 9337 70f6b183085a
equal deleted inserted replaced
9234:ce504d23edf7 9235:3eb8d65824f5
   286     def _ensure_test_backup_db_dir(self):
   286     def _ensure_test_backup_db_dir(self):
   287         """Return path of directory for database backup.
   287         """Return path of directory for database backup.
   288 
   288 
   289         The function create it if necessary"""
   289         The function create it if necessary"""
   290         backupdir = join(self.config.apphome, 'database')
   290         backupdir = join(self.config.apphome, 'database')
   291         if not isdir(backupdir):
   291         try:
   292             os.makedirs(backupdir)
   292             os.makedirs(backupdir)
       
   293         except:
       
   294             if not isdir(backupdir):
       
   295                 raise
   293         return backupdir
   296         return backupdir
   294 
   297 
   295     def config_path(self, db_id):
   298     def config_path(self, db_id):
   296         """Path for config backup of a given database id"""
   299         """Path for config backup of a given database id"""
   297         return self.absolute_backup_file(db_id, 'config')
   300         return self.absolute_backup_file(db_id, 'config')