mirror of https://github.com/zulip/zulip.git
mirroring: Fix import by putting 'api' path first
(imported from commit b35d962d6456f01b97deeeaa328faa03b65494f8)
This commit is contained in:
parent
0f0ff53527
commit
ae0d007e56
|
@ -26,7 +26,10 @@ parser.add_option('--root-path',
|
|||
action='store')
|
||||
(options, args) = parser.parse_args()
|
||||
|
||||
sys.path[:0] = [os.path.join(options.root_path, "python-zephyr"),
|
||||
# The 'api' directory needs to go first, so that 'import humbug' won't pick up
|
||||
# some other directory named 'humbug'.
|
||||
sys.path[:0] = [os.path.join(options.root_path, "api/"),
|
||||
os.path.join(options.root_path, "python-zephyr"),
|
||||
os.path.join(options.root_path, "python-zephyr/build/lib.linux-x86_64-2.6/"),
|
||||
options.root_path]
|
||||
|
||||
|
@ -34,7 +37,6 @@ mit_user = 'tabbott/extra@ATHENA.MIT.EDU'
|
|||
humbug_user = 'tabbott/extra@mit.edu'
|
||||
|
||||
sys.path.append(".")
|
||||
sys.path.append(path.join(path.dirname(__file__), '..'))
|
||||
import humbug
|
||||
humbug_client = humbug.Client(
|
||||
email=humbug_user,
|
||||
|
|
|
@ -774,8 +774,10 @@ if __name__ == "__main__":
|
|||
|
||||
(options, args) = parse_args()
|
||||
|
||||
sys.path[:0] = [options.root_path,
|
||||
os.path.join(options.root_path, 'api'),
|
||||
# The 'api' directory needs to go first, so that 'import humbug' won't pick
|
||||
# up some other directory named 'humbug'.
|
||||
sys.path[:0] = [os.path.join(options.root_path, 'api'),
|
||||
options.root_path,
|
||||
os.path.join(options.root_path, "python-zephyr"),
|
||||
os.path.join(options.root_path, "python-zephyr/build/lib.linux-x86_64-2.6/")]
|
||||
|
||||
|
|
Loading…
Reference in New Issue