Skip to content

Commit

Permalink
update code
Browse files Browse the repository at this point in the history
  • Loading branch information
ilsanbao committed Jan 9, 2015
1 parent bf1cb08 commit 9ad21ab
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion IP.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def load(file):
offset, = _unpack_N(dat[:4])
index = dat[4:offset]
except:
print "cannot open file 17monipdb.dat"
print "cannot open file %s" % file
exit(0)

def find(ip):
Expand Down
4 changes: 1 addition & 3 deletions IPX.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# coding: utf-8

import struct
from socket import gethostbyname
from socket import inet_aton
import os
import functools

_unpack_V = lambda b: struct.unpack("<L", b)
_unpack_N = lambda b: struct.unpack(">L", b)
Expand All @@ -23,7 +21,7 @@ def load(file):
offset, = _unpack_N(dat[:4])
index = dat[4:offset]
except:
print "cannot open file 17monipdb.dat"
print "cannot open file %s" % file
exit(0)

def find(ip):
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# python

查看 main.py 中的用法

0 comments on commit 9ad21ab

Please sign in to comment.