diff 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
line wrap: on
line diff
--- a/profilemanager/manager.py	Fri May 07 17:22:38 2010 -0700
+++ b/profilemanager/manager.py	Fri May 07 17:49:10 2010 -0700
@@ -158,6 +158,9 @@
                 dest = os.path.abspath(dest)
             name = dest
 
+        # ensure backup directory is not already present
+        assert not os.path.exists(dest), "'%s' already exists"
+
         # copy the files
         self.clone(profile, dest, add=False)