Skip to content

Commit

Permalink
Fixes old version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
jaymoulin committed Jun 7, 2019
1 parent 1f1159f commit 9821e19
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
@@ -1,4 +1,4 @@
VERSION ?= 0.4.4
VERSION ?= 0.4.5
CACHE ?= --no-cache=1
FULLVERSION ?= ${VERSION}
archs ?= arm32v7 amd64 i386 arm64v8 arm32v6
Expand Down
2 changes: 1 addition & 1 deletion github_release_notifier/__init__.py
Expand Up @@ -3,4 +3,4 @@
"""

__all__ = ['parser', 'webhook', 'notifier']
__version__ = '0.4.4'
__version__ = '0.4.5'
5 changes: 3 additions & 2 deletions github_release_notifier/notifier.py
Expand Up @@ -6,6 +6,7 @@
import requests
import logging
import threading
import re
from .webhook import get, get_list
from .parser import parse
from pathlib import Path
Expand Down Expand Up @@ -38,10 +39,10 @@ def run(file: str = __DEFAULT_FILE__) -> dict:
for entry in parse(package):
try:
condition = version_compare(str(entry['version']), str(get_version(package))) > 0
except e:
except TypeError:
try:
condition = LooseVersion(str(entry['version'])) > LooseVersion(str(get_version(package)))
except e:
except (AttributeError, TypeError):
condition = False
if condition:
database = _get_database(file)
Expand Down

0 comments on commit 9821e19

Please sign in to comment.