From: Ghe Rivero Date: Tue, 8 Nov 2011 20:20:51 +0000 (+0100) Subject: Added try import to quantum-server and quantum-cli X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=1c88385255e4206744d713167ad494ae4e0ef5b4;p=openstack-build%2Fneutron-build.git Added try import to quantum-server and quantum-cli Once that quantum is deployed there is no need to modified the python path importing source_environment. Change-Id: Iad4cce250137c6e5374ee90af6324f32f32da2ad --- diff --git a/bin/quantum b/bin/quantum index 649047493..23389c8a2 100755 --- a/bin/quantum +++ b/bin/quantum @@ -20,7 +20,12 @@ # it will override what happens to be installed in /usr/(local/)lib/python... import __init__ -import source_environment + +try: + import source_environment +except ImportError: + pass + from quantum.cli import main as cli cli() diff --git a/bin/quantum-server b/bin/quantum-server index d6b9fbe2a..7a09507b0 100755 --- a/bin/quantum-server +++ b/bin/quantum-server @@ -20,7 +20,11 @@ # it will override what happens to be installed in /usr/(local/)lib/python... import __init__ -import source_environment +try: + import source_environment +except ImportError: + pass + from quantum.server import main as server server()