]> git.donarmstrong.com Git - dak.git/blobdiff - daklib/holding.py
Use Package-List to look for NEW binaries.
[dak.git] / daklib / holding.py
index 2f36a696313badb4aad725685f1c1362df6c2765..6c9ce570a863319bde2e3bef679ddcbe264f94eb 100644 (file)
@@ -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.