Skip to content

Catch pypandoc ModuleNotFoundError #81

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

Merged
merged 1 commit into from
Sep 6, 2019

Conversation

robin-snt
Copy link
Contributor

@robin-snt robin-snt commented Sep 6, 2019

Python >= 3.6 doesn't receive ImportError, but instead
ModuleNotFoundError.

I haven't performed exhaustive testing, apart from confirming that the following pattern works on Python 2.7:

try:
    import foobar
except ImportError:
    print 'OK'
except ModuleNotFoundError:
    print 'Never reached on Python 2.7'

I also didn't want to "dry" up the duplicated code since it's short and contains a function definition on the top level scope.


This change is Reviewable

Python >= 3.6 doesn't receive ImportError, but instead
ModuleNotFoundError.
Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ A review job has been created and sent to the PullRequest network.


@robin-snt you can click here to see the review status or cancel the code review job.

@CLAassistant
Copy link

CLAassistant commented Sep 6, 2019

CLA assistant check
All committers have signed the CLA.

Copy link

@pullrequest pullrequest bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 seems good to me provided you confirmed it is actually working locally.


Reviewed with ❤️ by PullRequest

Copy link
Contributor

@martinmr martinmr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed 1 of 1 files at r1.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@martinmr
Copy link
Contributor

martinmr commented Sep 6, 2019

Thanks for the fix.

@martinmr martinmr merged commit 71da6fb into hypermodeinc:master Sep 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants