Skip to content

Conversation

@rafl
Copy link
Contributor

@rafl rafl commented Jan 31, 2017

No description provided.

@rafl rafl force-pushed the rafl/mmap-ext-without-extension branch from 2198948 to 144aa9d Compare January 31, 2017 18:51
Copy link
Member

@oschwald oschwald left a comment

Choose a reason for hiding this comment

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

Looks good. Just one comment on the exception type.

has_extension = maxminddb.extension and hasattr(maxminddb.extension, 'Reader')
if (mode == MODE_AUTO and has_extension) or mode == MODE_MMAP_EXT:
if not has_extension:
raise ImportError(
Copy link
Member

Choose a reason for hiding this comment

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

I think I'd expect a ValueError if I passed an invalid parameter, not an ImportError.

@oschwald oschwald merged commit c6578d4 into master Feb 1, 2017
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