2019-08-26 12:10:32 +12:00
|
|
|
#!/usr/bin/python3
|
2012-05-02 14:12:29 -05:00
|
|
|
|
2013-04-29 18:30:21 -04:00
|
|
|
# Copyright 2011 OpenStack Foundation
|
2012-05-02 14:12:29 -05:00
|
|
|
# All Rights Reserved.
|
|
|
|
#
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
|
2014-02-01 00:24:57 +00:00
|
|
|
"""This is necessary currently because the guest needs a init script.
|
|
|
|
When the guest is moved out of the application, this will no longer
|
|
|
|
be needed in the project."""
|
2012-05-02 14:12:29 -05:00
|
|
|
|
2014-02-01 00:24:57 +00:00
|
|
|
import os
|
2015-05-20 19:53:12 +00:00
|
|
|
import sys
|
2012-05-02 14:12:29 -05:00
|
|
|
|
|
|
|
possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]),
|
2013-08-29 16:03:29 +03:00
|
|
|
os.pardir,
|
|
|
|
os.pardir))
|
2013-06-19 13:44:44 -07:00
|
|
|
if os.path.exists(os.path.join(possible_topdir, 'trove', '__init__.py')):
|
2012-05-02 14:12:29 -05:00
|
|
|
sys.path.insert(0, possible_topdir)
|
|
|
|
|
2014-02-01 00:24:57 +00:00
|
|
|
from trove.cmd.guest import main
|
2013-10-28 23:12:35 -05:00
|
|
|
|
2014-02-01 00:24:57 +00:00
|
|
|
if __name__ == "__main__":
|
|
|
|
sys.exit(main())
|