X-Git-Url: https://git.decadent.org.uk/gitweb/?p=dak.git;a=blobdiff_plain;f=daklib%2Fholding.py;h=221a25775a2832bcbea206ad18ffb7e9700687c3;hp=2f36a696313badb4aad725685f1c1362df6c2765;hb=27e00376e81d1c37ff327ee0d39670b266418869;hpb=e956742235d6272e38424dc0c89b883153e776b7 diff --git a/daklib/holding.py b/daklib/holding.py index 2f36a696..221a2577 100644 --- a/daklib/holding.py +++ b/daklib/holding.py @@ -60,7 +60,7 @@ class Holding(object): try: fd = os.open(dest, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0640) os.close(fd) - except OSError, e: + except OSError as e: # Shouldn't happen, but will if, for example, someone lists a # file twice in the .changes. if e.errno == EEXIST: @@ -68,7 +68,7 @@ class Holding(object): try: shutil.copy(filename, dest) - except IOError, e: + except IOError as e: # In either case (ENOENT or EACCES) we want to remove the # O_CREAT | O_EXCLed ghost file, so add the file to the list # of 'in holding' even if it's not the real file.