File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,18 @@ def entry_points(self) -> Dict[str, str]:
6363
6464 # Parse the avaialble entry points
6565 config = configparser .ConfigParser ()
66- config .read_string (whl .read (entry_points_path ).decode ("utf-8" ))
67- if "console_scripts" in config .sections ():
68- return dict (config ["console_scripts" ])
66+ try :
67+ config .read_string (whl .read (entry_points_path ).decode ("utf-8" ))
68+ if "console_scripts" in config .sections ():
69+ return dict (config ["console_scripts" ])
70+
71+ # TODO: It's unclear what to do in a situation with duplicate sections or options.
72+ # For now, we treat the config file as though it contains no scripts. For more
73+ # details on the config parser, see:
74+ # https://docs.python.org/3.7/library/configparser.html#configparser.ConfigParser
75+ # https://docs.python.org/3.7/library/configparser.html#configparser.Error
76+ except configparser .Error :
77+ pass
6978
7079 return dict ()
7180
You can’t perform that action at this time.
0 commit comments