diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-04-06 03:55:10 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2010-04-06 04:01:54 +0200 |
commit | e39ed552b69e95217864855332e6c883466a4548 (patch) | |
tree | 30d2ffa1aa79fec376d9a349a99ac5edf6f63980 /selftest/subunithelper.py | |
parent | c75184b8a14ee686dacbf2dcf01eeade0327b648 (diff) | |
download | samba-e39ed552b69e95217864855332e6c883466a4548.tar.gz |
selftest: Remove python2.4-isms
Diffstat (limited to 'selftest/subunithelper.py')
-rw-r--r-- | selftest/subunithelper.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py index 8659f984d87..2c5fa318c50 100644 --- a/selftest/subunithelper.py +++ b/selftest/subunithelper.py @@ -190,6 +190,7 @@ class SubunitOps(object): def read_test_regexes(name): + ret = {} f = open(name, 'r') try: for l in f: @@ -198,15 +199,16 @@ def read_test_regexes(name): continue if "#" in l: (regex, reason) = l.split("#", 1) - yield (regex.strip(), reason.strip()) + ret[regex.strip()] = reason.strip() else: - yield l, None + ret[l] = None finally: f.close() + return ret def find_in_list(regexes, fullname): - for regex, reason in regexes: + for regex, reason in regexes.iteritems(): if re.match(regex, fullname): if reason is None: return "" |