Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c757f35

Browse files
committed
modifications+
1 parent 6a25e79 commit c757f35

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

zoomeye/sdk.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def find(self, key):
6161
:param key: str, dictionary key like: "a.b.c"
6262
:return:
6363
"""
64-
value = None
64+
values = None
6565
# is dict?
6666
if isinstance(self.dict, dict):
6767
keys = key.split(".")
@@ -70,16 +70,16 @@ def find(self, key):
7070
if k == 'geoinfo' and inputData.get(k) == None:
7171
k = "aiweninfo" if inputData.get("aiweninfo") else "ipipinfo"
7272
if inputData.get(k) is not None:
73-
value = inputData.get(k)
73+
values = inputData.get(k)
7474
else:
75-
value = None
76-
if isinstance(value, list):
77-
if len(value) != 0:
78-
value = value[0]
75+
values = None
76+
if isinstance(values, list):
77+
if len(values) != 0:
78+
values = values[0]
7979
else:
80-
value = '[unknown]'
81-
inputData = value
82-
return value
80+
values = '[unknown]'
81+
inputData = values
82+
return values
8383
else:
8484
raise TypeError("the parameter you pass in must be a dictionary, not a {}".format(type(self.dict)))
8585

0 commit comments

Comments
 (0)