comparison profilemanager/manager.py @ 77:e091caa41075

add assertion that path doesnt exist already
author Jeff Hammel <jhammel@mozilla.com>
date Fri, 07 May 2010 17:49:10 -0700
parents a63dd19807c8
children 145e111903d2
comparison
equal deleted inserted replaced
76:e76a122d8622 77:e091caa41075
155 dest = os.path.join(backups_dir, dest) 155 dest = os.path.join(backups_dir, dest)
156 else: 156 else:
157 if not os.path.isabs(dest): 157 if not os.path.isabs(dest):
158 dest = os.path.abspath(dest) 158 dest = os.path.abspath(dest)
159 name = dest 159 name = dest
160
161 # ensure backup directory is not already present
162 assert not os.path.exists(dest), "'%s' already exists"
160 163
161 # copy the files 164 # copy the files
162 self.clone(profile, dest, add=False) 165 self.clone(profile, dest, add=False)
163 166
164 # add backup entry to profiles.ini (colon separated): 167 # add backup entry to profiles.ini (colon separated):