Parcourir la source

[1259] Adding data

Michal 'vorner' Vaner il y a 13 ans
Parent
commit
f59415a8b5
1 fichiers modifiés avec 4 ajouts et 1 suppressions
  1. 4 1
      src/lib/python/isc/xfrin/diff.py

+ 4 - 1
src/lib/python/isc/xfrin/diff.py

@@ -66,7 +66,10 @@ class Diff:
         If this is not the case or if the diff was already commited, this
         raises the ValueError exception.
         """
-        pass
+        if rr.get_rdata_count() != 1:
+            raise ValueError('The rrset must contain exactly 1 Rdata, but ' +
+                             'it holds ' + str(rr.get_rdata_count()))
+        self.__buffer.append(('add', rr))
 
     def remove_data(self, rr):
         """