[SCM] Samba Shared Repository - branch master updated

Jelmer Vernooij jelmer at samba.org
Mon Apr 5 20:02:35 MDT 2010


The branch, master has been updated
       via  e39ed55... selftest: Remove python2.4-isms
      from  c75184b... Fix issue with aio where r/w lock wasn't kept across aio read operations.

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e39ed552b69e95217864855332e6c883466a4548
Author: Jelmer Vernooij <jelmer at samba.org>
Date:   Tue Apr 6 03:55:10 2010 +0200

    selftest: Remove python2.4-isms

-----------------------------------------------------------------------

Summary of changes:
 selftest/filter-subunit   |    4 ++--
 selftest/subunithelper.py |    8 +++++---
 2 files changed, 7 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 605a898..923d5cf 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -26,9 +26,9 @@ parser.add_option("--prefix", type="string",
 opts, args = parser.parse_args()
 
 if opts.expected_failures:
-	expected_failures = list(subunithelper.read_test_regexes(opts.expected_failures))
+	expected_failures = subunithelper.read_test_regexes(opts.expected_failures)
 else:
-	expected_failures = []
+	expected_failures = {}
 
 statistics = {
 	'TESTS_UNEXPECTED_OK': 0,
diff --git a/selftest/subunithelper.py b/selftest/subunithelper.py
index 8659f98..2c5fa31 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 ""


-- 
Samba Shared Repository


More information about the samba-cvs mailing list