Index: owners.py |
diff --git a/owners.py b/owners.py |
index 18dd31153756e6ebeedf42ef7f01da8b3c7f8c74..5aabb60077249a33233c3e08702d47e71b23a1e2 100644 |
--- a/owners.py |
+++ b/owners.py |
@@ -17,9 +17,10 @@ BASIC_EMAIL_REGEXP = r'^[\w\-\+\%\.]+\@[\w\-\+\%\.]+$' |
def _assert_is_collection(obj): |
- assert (isinstance(obj, collections.Iterable) and |
- isinstance(obj, collections.Sized) and |
- not isinstance(obj, basestring)) |
+ assert not isinstance(obj, basestring) |
+ if hasattr(collections, 'Iterable') and hasattr(collections, 'Sized'): |
+ assert (isinstance(obj, collections.Iterable) and |
+ isinstance(obj, collections.Sized)) |
class SyntaxErrorInOwnersFile(Exception): |