From b2cc84221952964d685d52eb9fe30870bca6f321 Mon Sep 17 00:00:00 2001
From: Phil <phil@secdev.org>
Date: Fri, 12 Sep 2008 14:02:13 +0200
Subject: [PATCH] Have None displayed instead of 0 for automatically computed
 fields

---
 scapy/asn1fields.py | 2 --
 scapy/fields.py     | 2 --
 2 files changed, 4 deletions(-)

diff --git a/scapy/asn1fields.py b/scapy/asn1fields.py
index 7351dad4..46dde2bc 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 4ea72db7..92428fd9 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"""
-- 
GitLab