Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
Builtin modules may not contain __dict__ attribute
Browse files Browse the repository at this point in the history
Fixes 169
  • Loading branch information
aaltat committed Oct 4, 2016
1 parent 3f52129 commit a08f325
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions dataparser/data_parser/data_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,12 @@ def _get_keywords_with_robot_name(self, libcode):
kw_deco = {}
for key in libcode.__dict__:
if callable(libcode.__dict__[key]):
if 'robot_name' in libcode.__dict__[key].__dict__:
kw_deco[libcode.__dict__[key].__dict__['robot_name']] = key
try:
if 'robot_name' in libcode.__dict__[key].__dict__:
kw = libcode.__dict__[key].__dict__['robot_name']
kw_deco[kw] = key
except AttributeError:
pass
return kw_deco

def _get_library_kw_source(self, libcode, keyword):
Expand Down

0 comments on commit a08f325

Please sign in to comment.