]> git.ipfire.org Git - thirdparty/dnspython.git/commitdiff
Make generate-rdatatype-doc.py work properly again.
authorBob Halley <halley@dnspython.org>
Sun, 27 Nov 2022 21:38:54 +0000 (13:38 -0800)
committerBob Halley <halley@dnspython.org>
Sun, 27 Nov 2022 21:38:54 +0000 (13:38 -0800)
util/generate-rdatatype-doc.py

index 5cc9f1147ee2b9750513a2800ceb86160bf30ffe..cadc936ca8ea920337458446bb01717baf8850d8 100644 (file)
@@ -5,7 +5,7 @@ print("----------")
 print()
 by_name = {}
 for rdtype in dns.rdatatype.RdataType:
-    short_name = str(rdtype).split(".")[1]
+    short_name = dns.rdatatype.to_text(rdtype).replace("-", "_")
     by_name[short_name] = int(rdtype)
 for k in sorted(by_name.keys()):
     v = by_name[k]