diff --git a/scapy/asn1fields.py b/scapy/asn1fields.py index 7351dad4b14464d6b6726c610d116a4d2b513afd..46dde2bcc0708673f4b1feb5297986672d4cd41b 100644 --- a/scapy/asn1fields.py +++ b/scapy/asn1fields.py @@ -50,8 +50,6 @@ class ASN1F_field(ASN1F_element): self.default = default def i2repr(self, pkt, x): - if x is None: - x = 0 return repr(x) def i2h(self, pkt, x): return x diff --git a/scapy/fields.py b/scapy/fields.py index 4ea72db7866894906269a5b008ce3bf6f05200fa..92428fd9ee7d53467b0937fa6ff027d63977d3a0 100644 --- a/scapy/fields.py +++ b/scapy/fields.py @@ -60,8 +60,6 @@ class Field: return self.h2i(pkt, x) def i2repr(self, pkt, x): """Convert internal value to a nice representation""" - if x is None: - x = 0 return repr(self.i2h(pkt,x)) def addfield(self, pkt, s, val): """Add an internal value to a string"""