>>> import dshield
>>> print(dshield.topips())
>>> import dshield
>>> print(dshield.topips())
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/my/path/here/lib/python2.7/site-packages/dshield.py", line 157, in topips
return _get(uri, return_format)
File "/my/path/here/lib/python2.7/site-packages/dshield.py", line 35, in _get
return _strip_and_reformat(requests.get(''.join([__BASE_URL, function, JSON])).json())
File "/my/path/here/lib/python2.7/site-packages/dshield.py", line 21, in _strip_and_reformat
data_copy = data.copy()
AttributeError: 'list' object has no attribute 'copy'
to maintain the shallow copy. I also added TypeError
to the execptions on line 25 of dshield.py
.
>>> import dshield
>>> print(dshield.topips())
Traceback (most recent call last):
File "<input>", line 1, in <module>
File "/my/path/here/lib/python3.5/site-packages/dshield.py", line 157, in topips
return _get(uri, return_format)
File "/my/path/here/lib/python3.5/site-packages/dshield.py", line 35, in _get
return _strip_and_reformat(requests.get(''.join([__BASE_URL, function, JSON])).json())
File "/my/path/here/lib/python3.5/site-packages/dshield.py", line 23, in _strip_and_reformat
data_copy.__delitem__('METAKEYINFO')
TypeError: list indices must be integers or slices, not str
Am I using this incorrectly or is this a current bug? If it's a bug I'm happy to make a PR.