Ross McFarland
8 years ago
No known key found for this signature in database
GPG Key ID: 61C10C4FC8FE4A89
2 changed files with
5 additions and
2 deletions
-
octodns/record.py
-
tests/test_octodns_record.py
|
|
|
@ -506,7 +506,10 @@ class MxValue(object): |
|
|
|
def _validate_value(cls, value): |
|
|
|
reasons = [] |
|
|
|
try: |
|
|
|
int(value.get('preference', None) or value['priority']) |
|
|
|
try: |
|
|
|
int(value['preference']) |
|
|
|
except KeyError: |
|
|
|
int(value['priority']) |
|
|
|
except KeyError: |
|
|
|
reasons.append('missing preference') |
|
|
|
except ValueError: |
|
|
|
|
|
|
|
@ -345,7 +345,7 @@ class TestRecord(TestCase): |
|
|
|
self.assertEquals(a_data, a.data) |
|
|
|
|
|
|
|
b_value = { |
|
|
|
'preference': 12, |
|
|
|
'preference': 0, |
|
|
|
'exchange': 'smtp3.', |
|
|
|
} |
|
|
|
b_data = {'ttl': 30, 'value': b_value} |
|
|
|
|