Use pkg_resources instead of packaging module

This commit is contained in:
Disassembler 2019-06-05 15:15:03 +02:00
parent 19b16c1244
commit 54d3c1d23b
No known key found for this signature in database
GPG Key ID: 524BD33A0EE29499

View File

@ -7,7 +7,7 @@ import shutil
import subprocess
from enum import Enum
from packaging.version import Version
from pkg_resources import parse_version
from werkzeug.exceptions import BadRequest, NotFound, Unauthorized
from . import crypto
@ -175,4 +175,4 @@ class PkgMgr:
def has_update(self, app):
if not self.online_packages:
return False
return Version(self.conf['packages'][app]['version']) < Version(self.online_packages[app]['version'])
return parse_version(self.conf['packages'][app]['version']) < parse_version(self.online_packages[app]['version'])