Skip to content

Commit

Permalink
Try to search package with "-" replaced by "_" in the name (as in "dj…
Browse files Browse the repository at this point in the history
…ango_compressor")
  • Loading branch information
fedosov committed Dec 3, 2013
1 parent 6ede690 commit f1910f1
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion updates.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Mikhail Fedosov ([email protected])"
__version__ = "0.1.3.8"
__version__ = "0.1.4"

# http://code.activestate.com/recipes/577708-check-for-package-updates-on-pypi-works-best-in-pi/
# http://stackoverflow.com/questions/287871/print-in-terminal-with-colors-using-python
Expand Down Expand Up @@ -64,6 +64,9 @@ def check_package(dist):
if not available:
# try to capitalize pkg name
available = pypi.package_releases(dist.project_name.capitalize())
if not available:
# try to replace "-" by "_" (as in "django_compressor")
available = pypi.package_releases(dist.project_name.replace("-", "_"))

if not available:
msg = u"{colors.FAIL}{symbols.FAIL}not found at PyPI{colors.ENDC}".format(colors=colors, symbols=symbols)
Expand Down

0 comments on commit f1910f1

Please sign in to comment.