mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-10 07:28:03 -05:00
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.
This commit is contained in:
@@ -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:]))
|
||||
|
||||
Reference in New Issue
Block a user