Skip to content

Commit

Permalink
attempt to replace now-deprecated distutils.LooseVersion with packagi…
Browse files Browse the repository at this point in the history
…ng.version

 * #78 (comment)
  • Loading branch information
maltfield committed Mar 31, 2024
1 parent ecfbbd3 commit 644fdfa
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/packages/buskill/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import urllib.request, re, json, certifi, sys, os, grp, pwd, math, shutil, tempfile, random, gnupg, configparser
import os.path
from buskill_version import BUSKILL_VERSION
from distutils.version import LooseVersion
from packaging.version import Version
from hashlib import sha256

import logging
Expand Down Expand Up @@ -2027,7 +2027,7 @@ def upgrade(self):
msg += "DEBUG: Latest version: " +str(latestRelease)+ "."
print( msg ); logger.debug( msg )

if LooseVersion(latestRelease) <= LooseVersion(currentRelease):
if Version(latestRelease) <= Version(currentRelease):
msg = "INFO: Current version is latest version. No new updates available."
print( msg ); logger.info( msg )
return self.set_upgrade_result( 1 )
Expand Down

0 comments on commit 644fdfa

Please sign in to comment.