]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Added try import to quantum-server and quantum-cli
authorGhe Rivero <ghe@debian.org>
Tue, 8 Nov 2011 20:20:51 +0000 (21:20 +0100)
committerGhe Rivero <ghe@debian.org>
Tue, 8 Nov 2011 20:20:51 +0000 (21:20 +0100)
Once that quantum is deployed there is no need to modified the python
path importing source_environment.

Change-Id: Iad4cce250137c6e5374ee90af6324f32f32da2ad

bin/quantum
bin/quantum-server

index 649047493c4e61ce4f5e99238f9881fdc84c26b9..23389c8a2dd97af298ae1e517b7258d055a29c3b 100755 (executable)
 # 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()
index d6b9fbe2a26d9ac6da08cc661dbac88821b4f7dc..7a09507b05f5c3087f24bc9067c353721dad22bd 100755 (executable)
 # 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()