# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-import dns.rdtypes.mxbase
+import dns.rdtypes.mxbase.MXBase
import struct
class A(dns.rdtypes.mxbase.MXBase):
__slots__ = ['domain', 'address']
def __init__(self, rdclass, rdtype, address, domain):
- super(dns.rdtypes.mxbase.MXBase, self).__init__(rdclass, rdtype)
+ super(MXBase, self).__init__(rdclass, rdtype)
self.domain = domain
self.address = address
# Helpers
- def get_int(self,base=10):
+ def get_int(self, base=10):
"""Read the next token and interpret it as an integer.
Raises dns.exception.SyntaxError if not an integer.
raise dns.exception.SyntaxError('expecting an identifier')
if not token.value.isdigit():
raise dns.exception.SyntaxError('expecting an integer')
- return int(token.value,base)
+ return int(token.value, base)
def get_uint8(self):
"""Read the next token and interpret it as an 8-bit unsigned
'%d is not an unsigned 8-bit integer' % value)
return value
- def get_uint16(self,base=10):
+ def get_uint16(self, base=10):
"""Read the next token and interpret it as a 16-bit unsigned
integer.
value = self.get_int(base=base)
if value < 0 or value > 65535:
- if base==8:
+ if base == 8:
raise dns.exception.SyntaxError(
'%o is not an octal unsigned 16-bit integer' % value)
else: