]> git.decadent.org.uk Git - dak.git/blobdiff - dak/update_db.py
get rid of stew config hacks
[dak.git] / dak / update_db.py
index 7d7fe9fe596a91082d816d77f8490e1661967c96..a51c7c1b39162b35586441ee3fac63905677eb2b 100755 (executable)
@@ -177,12 +177,12 @@ Updates dak's database schema to the lastest version. You should disable crontab
 
         self.update_db()
 
-#STU        try:
-#STU            lock_fd = os.open(Cnf["Dinstall::LockFile"], os.O_RDWR | os.O_CREAT)
-#STU            fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
-#STU        except IOError, e:
-#STU            if errno.errorcode[e.errno] == 'EACCES' or errno.errorcode[e.errno] == 'EAGAIN':
-#STU                utils.fubar("Couldn't obtain lock; assuming another 'dak process-unchecked' is already running.")
+        try:
+            lock_fd = os.open(Cnf["Dinstall::LockFile"], os.O_RDWR | os.O_CREAT)
+            fcntl.lockf(lock_fd, fcntl.LOCK_EX | fcntl.LOCK_NB)
+        except IOError, e:
+            if errno.errorcode[e.errno] == 'EACCES' or errno.errorcode[e.errno] == 'EAGAIN':
+                utils.fubar("Couldn't obtain lock; assuming another 'dak process-unchecked' is already running.")
 
 
 ################################################################################