Skip to content
Browse files

errors: Add .get(name, default) to ErrorSet.

  • Loading branch information...
1 parent 387cecc commit 93411812a7532fea7b3dd2d563818875075f6306 @andre-d andre-d committed with spladug Oct 23, 2012
Showing with 3 additions and 0 deletions.
  1. +3 −0 r2/r2/controllers/errors.py
View
3 r2/r2/controllers/errors.py
@@ -148,6 +148,9 @@ def __contains__(self, pair):
see if it's in the errors list."""
return self.errors.has_key(pair)
+ def get(self, name, default=None):
+ return self.errors.get(name, default)
+
def __getitem__(self, name):
return self.errors[name]

0 comments on commit 9341181

Please sign in to comment.
Something went wrong with that request. Please try again.