[dak/master 01/16] get rid of stew config hacks
---
dak/update_db.py | 12 ++++++------
daklib/config.py | 3 +--
daklib/utils.py | 3 +--
3 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/dak/update_db.py b/dak/update_db.py
index 7d7fe9f..a51c7c1 100755
--- a/dak/update_db.py
+++ b/dak/update_db.py
@@ -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.")
################################################################################
diff --git a/daklib/config.py b/daklib/config.py
index b98a6fc..09df17b 100755
--- a/daklib/config.py
+++ b/daklib/config.py
@@ -35,8 +35,7 @@ from singleton import Singleton
################################################################################
-#default_config = "/etc/dak/dak.conf"
-default_config = "/home/stew/etc/dak/dak.conf" #: default dak config, defines host properties
+default_config = "/etc/dak/dak.conf"
def which_conf_file(Cnf):
res = socket.gethostbyaddr(socket.gethostname())
diff --git a/daklib/utils.py b/daklib/utils.py
index ec1cd36..d88dbbd 100755
--- a/daklib/utils.py
+++ b/daklib/utils.py
@@ -53,8 +53,7 @@ from collections import defaultdict
################################################################################
-#default_config = "/etc/dak/dak.conf" #: default dak config, defines host properties
-default_config = "/home/stew/etc/dak/dak.conf" #: default dak config, defines host properties
+default_config = "/etc/dak/dak.conf" #: default dak config, defines host properties
default_apt_config = "/etc/dak/apt.conf" #: default apt config, not normally used
alias_cache = None #: Cache for email alias checks
--
1.6.5
Reply to: