Dulwich.io dulwich / 71f831b
Avoid hasattr. Jelmer Vernooij 3 years ago
1 changed file(s) with 1 addition(s) and 1 deletion(s). Raw diff Collapse all Expand all
125125 self.assertEqual(k in r, contained)
126126
127127 # Avoid deprecation warning under Py3.2+
128 if hasattr(self, 'assertRaisesRegex'):
128 if getattr(self, 'assertRaisesRegex', None):
129129 assertRaisesRegexp = self.assertRaisesRegex
130130 else:
131131 assertRaisesRegexp = self.assertRaisesRegexp