summaryrefslogtreecommitdiff
diff options
authorJonathan Cave <jonathan.cave@canonical.com>2018-06-28 16:53:58 +0100
committerJonathan Cave <jonathan.cave@canonical.com>2018-06-28 16:53:58 +0100
commit4ce97288f9313eba079ac4a94f7bb5b2744527ca (patch)
tree69b5189403e25d77f36895afd057723d53c366a2
parent9c6c81064ff028d32d3bf1a6f4fefe83e78567aa (diff)
Remove unnecessary use of regex
-rwxr-xr-xbin/boot_mode_test_snappy.py4
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