diff options
| author | Bob Halley <halley@play-bow.org> | 2022-03-12 14:45:40 -0800 |
|---|---|---|
| committer | Bob Halley <halley@play-bow.org> | 2022-03-12 14:45:40 -0800 |
| commit | d11b358c065e2af6fa7d517bf8abb12e99321fcb (patch) | |
| tree | bbeb82451c6a108e24d5513b7c883aecae5bc9d9 /dns | |
| parent | 8a05f0c96f0d1558c3d65deac9059162c5687a48 (diff) | |
| download | dnspython-2.2.tar.gz | |
Do no raise an assertion getting a nonexistent rdataset without a txn in a versioned zone.2.2
Diffstat (limited to 'dns')
| -rw-r--r-- | dns/versioned.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dns/versioned.py b/dns/versioned.py index 8b6c275..9e26759 100644 --- a/dns/versioned.py +++ b/dns/versioned.py @@ -265,7 +265,10 @@ class Zone(dns.zone.Zone): if create: raise UseTransaction rdataset = super().get_rdataset(name, rdtype, covers) - return dns.rdataset.ImmutableRdataset(rdataset) + if rdataset is not None: + return dns.rdataset.ImmutableRdataset(rdataset) + else: + return None def delete_rdataset(self, name, rdtype, covers=dns.rdatatype.NONE): raise UseTransaction |
