mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
If no partitions at all are found, pygrub never creates the name 'fs', resulting in a NameError indicating the lack of fs, rather than a RuntimeError explaining that no partitions were found. Set fs to None right at the start, and use the pythonic idiom "if fs is None:" to protect against otherwise valid values for fs which compare equal to 0/False. Reported-by: Sven Köhler <sven.koehler@gmail.com> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com> CC: Ian Campbell <Ian.Campbell@citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com> (cherry picked from commitd75215805c) (cherry picked from commit5ee75ef147)