diff options
author | Roger Pau Monne <roger.pau@entel.upc.edu> | 2012-02-07 17:21:27 +0000 |
---|---|---|
committer | Roger Pau Monne <roger.pau@entel.upc.edu> | 2012-02-07 17:21:27 +0000 |
commit | 7af6c7ad830ede5b9aad3fe58140e3f0aa0787af (patch) | |
tree | 1a3096f4cf47f903a3cc4b36aca5e3d01faa9e07 /tools/pygrub | |
parent | 9eaf53f5a0c6830aa16a062d9ab1e5de6d6a7f62 (diff) | |
download | xen-7af6c7ad830ede5b9aad3fe58140e3f0aa0787af.tar.gz xen-7af6c7ad830ede5b9aad3fe58140e3f0aa0787af.tar.bz2 xen-7af6c7ad830ede5b9aad3fe58140e3f0aa0787af.zip |
pygrub: extlinux parsing correctness
The "in" operator should be used instead of the find method, since
we are only interested in knowing whether the line contains "initrd=",
but we don't care about it's position. Also fixes an error that
happens when initrd= it's at the start of the line, since find returns
0 and is evaluated as False.
Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
Diffstat (limited to 'tools/pygrub')
-rw-r--r-- | tools/pygrub/src/ExtLinuxConf.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/pygrub/src/ExtLinuxConf.py b/tools/pygrub/src/ExtLinuxConf.py index 9d77b9f9bb..19776a3c92 100644 --- a/tools/pygrub/src/ExtLinuxConf.py +++ b/tools/pygrub/src/ExtLinuxConf.py @@ -60,7 +60,7 @@ class ExtLinuxImage(object): # Bypass regular self.commands handling com = None - elif arg.find("initrd="): + elif "initrd=" in arg: # find initrd image in append line args = arg.strip().split(" ") for a in args: |