Fix for issue 134: makecatalogs now warns if it would overwrite an existing catalog.

This commit is contained in:
Greg Neagle
2012-01-24 12:10:29 -08:00
parent 32d0241c89
commit 38701705b7
+7 -1
View File
@@ -148,7 +148,13 @@ def makecatalogs(repopath):
# write the new catalogs
for key in catalogs.keys():
catalogpath = os.path.join(repopath, "catalogs", key)
plistlib.writePlist(catalogs[key], catalogpath)
if os.path.exists(catalogpath):
print >> sys.stderr, ("WARNING: catalog %s already exists at "
"%s. Perhaps this is a non-case sensitive filesystem and you "
"have catalogs with names differing only in case?"
% (key, catalogpath))
else:
plistlib.writePlist(catalogs[key], catalogpath)
def main():