Skip to content

Commit

Permalink
Merge pull request makinacorpus#36 from nippo/master
Browse files Browse the repository at this point in the history
Adds a warning for "Module version, as defined in PEP-0396"
  • Loading branch information
leplatrem committed Sep 1, 2014
2 parents eb3ad80 + 51c6ee7 commit 59e092d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions djgeojson/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#: Module version, as defined in PEP-0396.
pkg_resources = __import__('pkg_resources')
distribution = pkg_resources.get_distribution('django-geojson')

__version__ = distribution.version

try:
distribution = pkg_resources.get_distribution('django-geojson')
__version__ = distribution.version
except:
__version__ = 'unknown'
import warnings
warnings.warn('No distribution found.')

GEOJSON_DEFAULT_SRID = 4326

0 comments on commit 59e092d

Please sign in to comment.