Move files around in the API.
Bots are not part of what we distribute, so put them in the repo root. We also updated some of the bots to use relative path names. (imported from commit 0471d863450712fd0cdb651f39f32e9041df52ba)
This commit is contained in:
parent
2a47fc4777
commit
d8f13837d9
|
@ -10,7 +10,7 @@ import itertools
|
||||||
import traceback
|
import traceback
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
sys.path.append(path.join(path.dirname(__file__), '..'))
|
sys.path.append(path.join(path.dirname(__file__), '../api'))
|
||||||
import humbug
|
import humbug
|
||||||
|
|
||||||
parser = optparse.OptionParser(r"""
|
parser = optparse.OptionParser(r"""
|
|
@ -18,6 +18,7 @@ from trac.core import Component, implements
|
||||||
from trac.ticket import ITicketChangeListener
|
from trac.ticket import ITicketChangeListener
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
# This script lives on one machine, so an absolute path is fine.
|
||||||
sys.path.append("/home/humbug/humbug/api")
|
sys.path.append("/home/humbug/humbug/api")
|
||||||
import humbug
|
import humbug
|
||||||
client = humbug.Client(
|
client = humbug.Client(
|
|
@ -3,7 +3,7 @@ import sys
|
||||||
import optparse
|
import optparse
|
||||||
from os import path
|
from os import path
|
||||||
|
|
||||||
sys.path.append(path.join(path.dirname(__file__), '..'))
|
sys.path.append(path.join(path.dirname(__file__), '../api'))
|
||||||
import humbug
|
import humbug
|
||||||
|
|
||||||
# Nagios passes the notification details as command line options.
|
# Nagios passes the notification details as command line options.
|
|
@ -42,7 +42,7 @@ from os import path, environ
|
||||||
# Here we assume it's in the parent of the directory
|
# Here we assume it's in the parent of the directory
|
||||||
# where this script lives.
|
# where this script lives.
|
||||||
|
|
||||||
humbug_directory = path.join(path.dirname(__file__), '..')
|
humbug_directory = path.join(path.dirname(__file__), '../api')
|
||||||
|
|
||||||
|
|
||||||
sys.path.append(humbug_directory)
|
sys.path.append(humbug_directory)
|
|
@ -7,7 +7,7 @@ from os import path
|
||||||
|
|
||||||
CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc")
|
CONFIGFILE = os.path.expanduser("~/.humbug_twitterrc")
|
||||||
|
|
||||||
sys.path.append(path.join(path.dirname(__file__), '../..'))
|
sys.path.append(path.join(path.dirname(__file__), '../api'))
|
||||||
import humbug
|
import humbug
|
||||||
|
|
||||||
def write_config(config, since_id, user):
|
def write_config(config, since_id, user):
|
Loading…
Reference in a new issue