mirror of
https://github.com/github/octodns.git
synced 2024-05-11 05:55:00 +00:00
Fix bug in Manager when using Python 2.7
In Python 2.7 the if statement would catch both cases from the test test_populate_lenient_fallback, so the test was failing. These are the error strings differences between Python 2 and 3: Python 2: NoLenient: populate() got an unexpected keyword argument 'lenient' NoZone: populate() got multiple values for keyword argument 'lenient' Python 3: NoLenient: populate() got an unexpected keyword argument 'lenient' NoZone: populate() got multiple values for argument 'lenient'
This commit is contained in:
+2
-1
@@ -243,7 +243,8 @@ class Manager(object):
|
||||
try:
|
||||
source.populate(zone, lenient=lenient)
|
||||
except TypeError as e:
|
||||
if "keyword argument 'lenient'" not in text_type(e):
|
||||
if ("unexpected keyword argument 'lenient'"
|
||||
not in text_type(e)):
|
||||
raise
|
||||
self.log.warn(': provider %s does not accept lenient '
|
||||
'param', source.__class__.__name__)
|
||||
|
||||
Reference in New Issue
Block a user