Need compare indexes when extract amqp conf files

* swap the indexes if argv1_index is bigger than argv2_index

Change-Id: Id93ef544c4a4280587edce3fb2d70e254ee2b860
Closes-Bug: 1371504
This commit is contained in:
Le Tian Ren 2014-09-19 17:33:51 +08:00
parent 2b714e12e5
commit ef4147a170
1 changed files with 2 additions and 0 deletions

View File

@ -35,6 +35,8 @@ if 'powervc' in sys.argv[0]:
+ " amqp-openstack.conf(or openstack-neutron.conf)"
+ " are required.")
else:
if argv1_index > argv2_index:
argv1_index, argv2_index = argv2_index, argv1_index
sys.argv = (sys.argv[:argv1_index]
+ sys.argv[argv1_index+2:argv2_index]
+ sys.argv[argv2_index+2:])