update raise syntax in safer_move()

This commit is contained in:
Mike McLean 2016-07-26 16:17:47 -04:00
parent 8bd4b49822
commit 0e7c45a544

View file

@ -327,9 +327,9 @@ def safer_move(src, dst):
directory, then an error is raised.
"""
if os.path.exists(dst):
raise koji.GenericError, "Destination exists: %s" % dst
raise koji.GenericError("Destination exists: %s" % dst)
elif os.path.islink(dst):
raise koji.GenericError, "Destination is a symlink: %s" % dst
raise koji.GenericError("Destination is a symlink: %s" % dst)
# TODO - use locking to do a better job of catching races
shutil.move(src, dst)