zephyr-mirror: Clean up hardcoded path names.
(imported from commit 42338d94deb94312c2dee43851bc3c04e3ab373c)
This commit is contained in:
parent
58647ef04c
commit
3aaefa5108
|
@ -13,8 +13,9 @@ import datetime
|
||||||
import textwrap
|
import textwrap
|
||||||
from urllib2 import HTTPError
|
from urllib2 import HTTPError
|
||||||
|
|
||||||
sys.path.append("/mit/tabbott/Public/python-zephyr/")
|
root_path = "/mit/tabbott/for_friends"
|
||||||
sys.path.append("/mit/tabbott/Public/python-zephyr/build/lib.linux-x86_64-2.6/")
|
sys.path.append(root_path + "/python-zephyr")
|
||||||
|
sys.path.append(root_path + "/python-zephyr/build/lib.linux-x86_64-2.6/")
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
parser.add_option('--forward-class-messages',
|
parser.add_option('--forward-class-messages',
|
||||||
|
@ -134,11 +135,11 @@ def update_subscriptions_from_humbug():
|
||||||
ensure_subscribed(stream)
|
ensure_subscribed(stream)
|
||||||
|
|
||||||
def maybe_restart_mirroring_script():
|
def maybe_restart_mirroring_script():
|
||||||
if os.stat("/mit/tabbott/for_friends/restart_stamp").st_mtime > start_time:
|
if os.stat(root_path + "/restart_stamp").st_mtime > start_time:
|
||||||
print "zephyr mirroring script has been updated; restarting..."
|
print "zephyr mirroring script has been updated; restarting..."
|
||||||
while True:
|
while True:
|
||||||
try:
|
try:
|
||||||
os.execvp("/mit/tabbott/for_friends/zephyr_mirror.py", sys.argv)
|
os.execvp(root_path + "/zephyr_mirror.py", sys.argv)
|
||||||
except:
|
except:
|
||||||
print "Error restarting, trying again."
|
print "Error restarting, trying again."
|
||||||
traceback.print_exc()
|
traceback.print_exc()
|
||||||
|
|
Loading…
Reference in a new issue