Browse Source

Apply suggestions from code review

Co-Authored-By: Theo Julienne <theojulienne@github.com>
pull/384/head
Ross McFarland 6 years ago
committed by GitHub
parent
commit
b3bd4382cc
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions
  1. +4
    -0
      octodns/manager.py
  2. +1
    -1
      octodns/provider/rackspace.py
  3. +1
    -1
      octodns/record/__init__.py

+ 4
- 0
octodns/manager.py View File

@ -283,6 +283,8 @@ class Manager(object):
self.log.info('sync: sources=%s -> targets=%s', sources, targets)
try:
# rather than using a list comprehension, we break this loop out
# so that the `except` block below can reference the `source`
collected = []
for source in sources:
collected.append(self.providers[source])
@ -408,6 +410,8 @@ class Manager(object):
.format(zone_name))
try:
# rather than using a list comprehension, we break this loop out
# so that the `except` block below can reference the `source`
collected = []
for source in sources:
collected.append(self.providers[source])


+ 1
- 1
octodns/provider/rackspace.py View File

@ -14,7 +14,7 @@ from .base import BaseProvider
def _value_keyer(v):
return '{}-{}-{}'.format(v.get('type', ''), v['name'], v.get('data', ''))
return (v.get('type', ''), v['name'], v.get('data', ''))
def add_trailing_dot(s):


+ 1
- 1
octodns/record/__init__.py View File

@ -926,7 +926,7 @@ class MxValue(object):
}
def __hash__(self):
return hash('{} {}'.format(self.preference, self.exchange))
return hash((self.preference, self.exchange))
def __eq__(self, other):
return ((self.preference, self.exchange) ==


Loading…
Cancel
Save