$OpenBSD: patch-dpkt_ip_py,v 1.1 2010/06/23 16:53:15 fgsch Exp $ --- dpkt/ip.py.orig Thu Jun 17 15:51:24 2010 +++ dpkt/ip.py Thu Jun 17 15:50:52 2010 @@ -247,9 +247,9 @@ def __load_protos(): name = k[9:].lower() try: mod = __import__(name, g) - except ImportError: + IP.set_proto(v, getattr(mod, name.upper())) + except (ImportError, AttributeError): continue - IP.set_proto(v, getattr(mod, name.upper())) if not IP._protosw: __load_protos()