Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9)

Unified Diff: owners.py

Issue 6740012: merge in fixes for python 2.5 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/depot_tools
Patch Set: Created 9 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tests/owners_unittest.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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):
« no previous file with comments | « no previous file | tests/owners_unittest.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698