Author: waldi Date: Thu Apr 28 07:41:11 2011 New Revision: 880 Log: config/bin/genorig.py: Don''t overwrite existing files. Modified: trunk/xen/debian/bin/genorig.py Modified: trunk/xen/debian/bin/genorig.py =============================================================================--- trunk/xen/debian/bin/genorig.py Wed Apr 27 12:51:46 2011 (r879) +++ trunk/xen/debian/bin/genorig.py Thu Apr 28 07:41:11 2011 (r880) @@ -80,6 +80,11 @@ out = "../orig/%s" % self.orig_tar self.log("Generate tarball %s\n" % out) + try: + os.stat(out) + raise RuntimeError("Destination already exists") + except OSError: pass + subprocess.check_call((''tar'', ''-C'', self.temp_dir, ''-czf'', out, self.orig_dir))