X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=daklib%2Fholding.py;h=6c9ce570a863319bde2e3bef679ddcbe264f94eb;hb=9dbb7b6ec34adb6a28180279895c888806f6e9de;hp=2f36a696313badb4aad725685f1c1362df6c2765;hpb=db2d829cce8f0dd8aadb6af5e6258ab4fced871d;p=dak.git diff --git a/daklib/holding.py b/daklib/holding.py index 2f36a696..6c9ce570 100644 --- a/daklib/holding.py +++ b/daklib/holding.py @@ -58,9 +58,9 @@ class Holding(object): dest = os.path.join(self.holding_dir, base_filename) try: - fd = os.open(dest, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0640) + fd = os.open(dest, os.O_RDWR | os.O_CREAT | os.O_EXCL, 0o640) 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.