Skip to content

Commit

Permalink
wrap-job: Don't cd into r2/r2/ when we just want to be in r2/.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
spladug committed Feb 14, 2013
1 parent 775c795 commit 77efa9a
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions scripts/wrap-job
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:]))
Expand Down

0 comments on commit 77efa9a

Please sign in to comment.