Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit74d14ac

Browse files
committed
update
1 parent4433656 commit74d14ac

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

‎example.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
importipdb
22

3-
db=ipdb.Reader("C:/WORK/tiantexin/framework/library/ip/mydata6.ipdb")
3+
db=ipdb.Reader("c:/work/tiantexin/bb/v6/mydata6vipday4.ipdb")
44

55
print(db.support_languages())
66

‎ipdb/database.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ def __init__(self, name):
3131
meta=json.loads(self.data[4:meta_length+4])
3232

3333
self._meta=MetaData(**meta)
34+
iflen(self._meta.languages)==0orlen(self._meta.fields)==0:
35+
raiseDatabaseError("database meta error")
36+
ifself.file_size!= (4+meta_length+self._meta.total_size):
37+
raiseDatabaseError("database size error")
38+
3439
self.data=self.data[4+meta_length:]
3540

3641
def_read_node(self,node,idx):
@@ -140,3 +145,6 @@ def is_support_ipv4(self):
140145

141146
defis_support_ipv6(self):
142147
return (self._meta.ip_version&0x02)==0x02
148+
149+
defbuild_utc_time(self):
150+
returnself._meta.build

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp