From 77efa9ab436142b9cf948b65e1a69fe52a3f9b6f Mon Sep 17 00:00:00 2001 From: Neil Williams Date: Wed, 13 Feb 2013 11:48:47 -0800 Subject: [PATCH] wrap-job: Don't cd into r2/r2/ when we just want to be in r2/. This was causing Pygments to fail to import correctly in jobs since r2/r2/ has a commands.py which was getting relatively imported by accident. Yuck. --- scripts/wrap-job | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/wrap-job b/scripts/wrap-job index 13796af95b..80962f1a03 100755 --- a/scripts/wrap-job +++ b/scripts/wrap-job @@ -16,8 +16,7 @@ REDDIT_GROUP REDDIT_ROOT - The root directory of the reddit repo. Should contain - r2/, scripts/ etc. + The root directory of the reddit package. It's where the makefile lives. REDDIT_LOG_FACILITY @@ -45,9 +44,8 @@ os.setgid(gid) os.setuid(uid) # change directory to the reddit code root -root = os.environ.get("REDDIT_ROOT", "/opt/reddit/lib/public") -r2_root = os.path.join(root, "r2") -os.chdir(r2_root) +root = os.environ.get("REDDIT_ROOT", "/opt/reddit/lib/public/r2") +os.chdir(root) # configure syslog job_name = os.environ.get("UPSTART_JOB", "-".join(sys.argv[1:]))