[copr] skvidal-backend: when we daemonize() we chdir() so if we don't abspath the config file we fall over and die :-/ (9f65c8f)
skvidal at fedorahosted.org
skvidal at fedorahosted.org
Wed Dec 5 21:31:10 UTC 2012
Repository : http://git.fedorahosted.org/cgit/copr.git
On branch : skvidal-backend
>---------------------------------------------------------------
commit 9f65c8fd7a6cd0ce5931d61dce51b71ad5b3af0f
Author: Seth Vidal <skvidal at fedoraproject.org>
Date: Wed Dec 5 16:29:00 2012 -0500
when we daemonize() we chdir() so if we don't abspath the config file we fall over and die :-/
>---------------------------------------------------------------
copr-be.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/copr-be.py b/copr-be.py
index 9a5e3a4..9cd2bba 100644
--- a/copr-be.py
+++ b/copr-be.py
@@ -191,6 +191,7 @@ def parse_args(args):
if not os.path.exists(opts.config_file):
print "No config file found at: %s" % opts.config_file
sys.exit(1)
+ opts.config_file = os.path.abspath(opts.config_file)
ret_opts = Bunch()
for o in ('daemonize', 'exit_on_worker', 'pidfile', 'config_file'):
@@ -204,9 +205,9 @@ def main(args):
opts = parse_args(args)
try:
+ cbe = CoprBackend(opts.config_file, ext_opts=opts)
if opts.daemonize:
daemonize(opts.pidfile)
- cbe = CoprBackend(opts.config_file, ext_opts=opts)
cbe.run()
except Exception, e:
print 'Killing/Dying'
More information about the copr-devel
mailing list