comparison profilemanager/manager.py @ 71:494ea3c2f578

use correct ConfigParser method
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 16:07:29 -0700
parents 6e282cacd5f0
children 1cfd259f74cf
comparison
equal deleted inserted replaced
70:6e282cacd5f0 71:494ea3c2f578
285 backups = [ i for i in backups if i != backup[0] ] 285 backups = [ i for i in backups if i != backup[0] ]
286 parser.set(section, 'Backups', ':'.join(backups)) 286 parser.set(section, 'Backups', ':'.join(backups))
287 287
288 # if there are no backups, delete the ``backups`` line 288 # if there are no backups, delete the ``backups`` line
289 # and the backups directory 289 # and the backups directory
290 import pdb; pdb.set_trace()
291 if not backups: 290 if not backups:
292 parser.remove(section, 'Backups') 291 parser.remove_option(section, 'Backups')
293 backups_dir = os.path.join(self.profile_dir, self.backups_dir) 292 backups_dir = os.path.join(self.profile_dir, self.backups_dir)
294 if not os.listdir(backups_dir): 293 if not os.listdir(backups_dir):
295 shutil.rmtree(backups_dir) 294 shutil.rmtree(backups_dir)
296 295
297 def temporary(self): 296 def temporary(self):