pvl/dns/zone.py
changeset 294 29720bbc5379
parent 292 cc4a4a2f2b76
child 295 8c6d4565576f
--- a/pvl/dns/zone.py	Mon Dec 16 23:16:32 2013 +0200
+++ b/pvl/dns/zone.py	Tue Dec 17 00:42:31 2013 +0200
@@ -299,10 +299,10 @@
         return cls.build(line, name, ttl, _cls, type, data, **opts)
     
     @classmethod
-    def build (_cls, line, name, ttl, cls, type, data, **opts) :
-        return _cls(name, type, data,
+    def build (cls, line, name, ttl, _cls, type, data, **opts) :
+        return cls(name, type, data,
             ttl     = ttl,
-            cls     = cls,
+            cls     = _cls,
             line    = line,
             **opts
         )
@@ -330,7 +330,7 @@
     def MX (cls, name, priority, mx, **opts) :
         return cls(str(name), 'MX', [int(priority), str(mx)], **opts)
 
-    def __init__ (self, name, type, data, origin=None, ttl=None, cls=None, line=None, comment=None) :
+    def __init__ (self, name, type, data, ttl=None, cls=None, line=None, origin=None, comment=None) :
         self.name = name
         self.type = type
         self.data = data
@@ -338,9 +338,8 @@
         self.ttl = ttl
         self.cls = cls
         
+        self.line = line
         self.origin = origin
-        self.line = line
-
         self.comment = comment
 
     def __unicode__ (self) :
@@ -369,10 +368,10 @@
 
 class SOA (ZoneRecord) :
     @classmethod
-    def build (_cls, line, name, ttl, cls, type, data, **opts) :
+    def build (cls, line, name, ttl, _cls, type, data, **opts) :
         assert name == '@'
 
-        return _cls(*data,
+        return cls(*data,
             ttl     = ttl,
             cls     = cls,
             line    = line,