[svn] commit: r2260 - /branches/tingting-loadzone/src/lib/python/isc/datasrc/master.py
BIND 10 source code commits
bind10-changes at lists.isc.org
Thu Jun 24 09:40:35 UTC 2010
Author: shentingting
Date: Thu Jun 24 09:40:35 2010
New Revision: 2260
Log:
bug fix. ticket #244. And add a new test file.
Modified:
branches/tingting-loadzone/src/lib/python/isc/datasrc/master.py
Modified: branches/tingting-loadzone/src/lib/python/isc/datasrc/master.py
==============================================================================
--- branches/tingting-loadzone/src/lib/python/isc/datasrc/master.py (original)
+++ branches/tingting-loadzone/src/lib/python/isc/datasrc/master.py Thu Jun 24 09:40:35 2010
@@ -343,6 +343,12 @@
MasterFile.__lastttl = ttl or MasterFile.__lastttl
rdata = ' '.join(list[4:])
ret = name, ttl, rrclass, rrtype, rdata
+ elif isclass(list[1]) and isttl(list[2]) and isname(list[0]):
+ name, rrclass, ttl, rrtype = list[0:4]
+ ttl = parse_ttl(ttl)
+ MasterFile.__lastttl = ttl or MasterFile.__lastttl
+ rdata = ' '.join(list[4:])
+ ret = name, ttl, rrclass, rrtype, rdata
return ret
#########################################################################
@@ -366,19 +372,23 @@
rrclass = list[1]
ttl = self.__getttl()
name = list[0]
- elif not isclass(list[1]) and isttl(list[1]) and isname(list[0]):
+ elif not isclass(list[1]) and isttl(list[1]) and not isclass(list[0]) and isname(list[0]):
rrclass = self.__rrclass
ttl = parse_ttl(list[1])
MasterFile.__lastttl = ttl or MasterFile.__lastttl
name = list[0]
elif curname and isclass(list[1]) and isttl(list[0]):
- rrclass = self.__rrclass
+ rrclass = list[1]
ttl = parse_ttl(list[0])
+ MasterFile.__lastttl = ttl or MasterFile.__lastttl
+ name = curname
+ elif curname and isttl(list[1]) and isclass(list[0]):
+ rrclass = list[0]
+ ttl = parse_ttl(list[1])
MasterFile.__lastttl = ttl or MasterFile.__lastttl
name = curname
else:
return ret
-
rrtype = list[2]
rdata = ' '.join(list[3:])
ret = name, ttl, rrclass, rrtype, rdata
@@ -411,6 +421,10 @@
ttl = parse_ttl(list[0])
name = curname
rdata = ' '.join(list[2:])
+ elif isclass(list[0]):
+ ttl = self.__getttl()
+ name = curname
+ rdata = ' '.join(list[2:])
elif isname(list[0]):
name = list[0]
ttl = self.__getttl()
More information about the bind10-changes
mailing list