Permalink
Browse files

Make dependency on socket.inet_ntoa

Also delete useless vim swap file.
  • Loading branch information...
1 parent 55cc4d6 commit 86c13852a4d41f929bd8f641011ae40504516b58 Andrew Fleenor committed Jul 12, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 pcaputil.py
  2. BIN tcp/.direction.py.swp
View
@@ -3,7 +3,12 @@
'''
import dpkt
-from socket import inet_ntoa
+
+# use inet_ntoa to process IPs, if available (it's not on AppEngine)
+try:
+ from socket import inet_ntoa
+except ImportError:
+ inet_ntoa = lambda ip: ip
def friendly_tcp_flags(flags):
'''
View
Binary file not shown.

0 comments on commit 86c1385

Please sign in to comment.