Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix exception handling for the import of essential modules #260

Open
elfring opened this issue Sep 25, 2021 · 3 comments
Open

Fix exception handling for the import of essential modules #260

elfring opened this issue Sep 25, 2021 · 3 comments
Assignees
Labels

Comments

@elfring
Copy link

elfring commented Sep 25, 2021

The script “guider.py” contains the following source code at the moment.

try:
…
    import sys

I doubt that the specified exception handling can work if the mentioned statement failed. 🤔

except ImportError:
    err = sys.exc_info()[1]
…
@iipeace
Copy link
Owner

iipeace commented Sep 25, 2021

@elfring You are right!
It can be shown strange logically,
But I think it is impossible to fail to import sys module in python :)

@elfring
Copy link
Author

elfring commented Sep 25, 2021

How do you think about to split the affected code so that it will be correct? 🤔

@iipeace
Copy link
Owner

iipeace commented Sep 25, 2021

@elfring I agree with you!
I'll split them :)

iipeace added a commit that referenced this issue Sep 25, 2021
Signed-off-by: Peace Lee <iipeace5@gmail.com>
@iipeace iipeace self-assigned this Sep 25, 2021
@iipeace iipeace added the bug label Sep 25, 2021
iipeace added a commit that referenced this issue Sep 25, 2021
Signed-off-by: Peace Lee <iipeace5@gmail.com>
elfring referenced this issue Sep 29, 2021
Signed-off-by: Peace Lee <iipeace5@gmail.com>
iipeace added a commit that referenced this issue Sep 30, 2021
Signed-off-by: Peace Lee <iipeace5@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants