Fix support for --flagfile argument

Recent changes broke support for the --flagfile argument. It would attempt
to find the argument and then pull off the filename portion, but it would
only skip one letter, instead of the full argument name. The resulting
error would be:

Change-Id: Ic252b0c778774a7ea3e24a9ed8b182deb5987f65
OSError: [Errno 2] No such file or directory: 'lagfile=../nova.conf'
This commit is contained in:
Johannes Erdfelt 2012-02-07 15:49:13 +00:00
parent 4ed27f44ba
commit 829e2126d1

View File

@ -325,7 +325,7 @@ def default_flagfile(filename='nova.conf', args=None):
args = sys.argv
for arg in args:
if arg.find('flagfile') != -1:
return arg[arg.index('flagfile') + 1:]
return arg[arg.index('flagfile') + len('flagfile') + 1:]
else:
if not os.path.isabs(filename):
# turn relative filename into an absolute path