forked from pool/python-requirements-detector
23 lines
1.0 KiB
Diff
23 lines
1.0 KiB
Diff
|
Index: requirements-detector-1.2.2/requirements_detector/handle_setup.py
|
||
|
===================================================================
|
||
|
--- requirements-detector-1.2.2.orig/requirements_detector/handle_setup.py
|
||
|
+++ requirements-detector-1.2.2/requirements_detector/handle_setup.py
|
||
|
@@ -1,7 +1,7 @@
|
||
|
from pathlib import Path
|
||
|
from typing import Union
|
||
|
|
||
|
-from astroid import MANAGER, AstroidBuildingException, AstroidSyntaxError
|
||
|
+from astroid import MANAGER, AstroidBuildingError, AstroidSyntaxError
|
||
|
from astroid.builder import AstroidBuilder
|
||
|
from astroid.nodes import Assign, AssignName, Call, Const, Keyword, List, Name, Tuple
|
||
|
|
||
|
@@ -92,7 +92,7 @@ def from_setup_py(setup_file: Union[str,
|
||
|
|
||
|
try:
|
||
|
ast = AstroidBuilder(MANAGER).string_build(setup_file.open().read())
|
||
|
- except (SyntaxError, AstroidBuildingException, AstroidSyntaxError):
|
||
|
+ except (SyntaxError, AstroidBuildingError, AstroidSyntaxError):
|
||
|
# if the setup file is broken, we can't do much about that...
|
||
|
raise CouldNotParseRequirements
|
||
|
|