Skip to content

Commit

Permalink
fix scrapy.version_info when SCRAPY_VERSION_FROM_GIT is set
Browse files Browse the repository at this point in the history
  • Loading branch information
kmike committed Apr 16, 2014
1 parent 7814cbf commit e8e689a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scrapy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
__version__ = pkgutil.get_data(__package__, 'VERSION').strip()
if not isinstance(__version__, str):
__version__ = __version__.decode('ascii')
version_info = tuple(int(v) for v in __version__.split('.')[:3])
version_info = tuple(int(v) if v.isdigit() else v
for v in __version__.split('.'))

import sys, os, warnings

Expand Down

0 comments on commit e8e689a

Please sign in to comment.