Skip to content

Commit

Permalink
Avoid hasattr.
Browse files Browse the repository at this point in the history
  • Loading branch information
jelmer committed Dec 3, 2015
1 parent 0b78314 commit 71f831b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dulwich/tests/test_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def test_getitem_unicode(self):
self.assertEqual(k in r, contained)

# Avoid deprecation warning under Py3.2+
if hasattr(self, 'assertRaisesRegex'):
if getattr(self, 'assertRaisesRegex', None):
assertRaisesRegexp = self.assertRaisesRegex
else:
assertRaisesRegexp = self.assertRaisesRegexp
Expand Down

0 comments on commit 71f831b

Please sign in to comment.