diff options
author | Jonathan Cave <jonathan.cave@canonical.com> | 2018-06-28 16:53:58 +0100 |
---|---|---|
committer | Jonathan Cave <jonathan.cave@canonical.com> | 2018-06-28 16:53:58 +0100 |
commit | 4ce97288f9313eba079ac4a94f7bb5b2744527ca (patch) | |
tree | 69b5189403e25d77f36895afd057723d53c366a2 | |
parent | 9c6c81064ff028d32d3bf1a6f4fefe83e78567aa (diff) |
Remove unnecessary use of regex
-rwxr-xr-x | bin/boot_mode_test_snappy.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/bin/boot_mode_test_snappy.py b/bin/boot_mode_test_snappy.py index 2795a6f..963a5de 100755 --- a/bin/boot_mode_test_snappy.py +++ b/bin/boot_mode_test_snappy.py @@ -18,9 +18,7 @@ def fitdumpimage(filename): buf = io.StringIO(out) # first line should identify FIT file - desc = buf.readline() - fit_re = re.compile(r'^FIT description') - if not fit_re.search(desc): + if not buf.readline().startswith('FIT description'): raise SystemExit('ERROR: expected FIT image description') # second line contains some metadata, skip it |