Skip to content

Commit

Permalink
fix (semver): fixed semver update check, replaced deprecaded functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Mario Lukas committed Mar 19, 2022
1 parent 00603d4 commit b9108bb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/fabscan/config/dev.config.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
},
"laser": {
"interleaved": "False",
"numbers": 1,
"numbers": 2,
"color": "R (RGB)"
},
"scanner_type": "laserscanner",
Expand Down Expand Up @@ -90,7 +90,7 @@
"meshlab": {
"path": "/usr/bin/"
},
"process_numbers": 2,
"process_numbers": 3,
"turntable": {
"steps": 6400,
"radius": 70,
Expand Down
13 changes: 4 additions & 9 deletions src/fabscan/lib/util/FSUpdate.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,24 @@
import urllib.request, urllib.error, urllib.parse
import ssl
import socket
import subprocess


REMOTE_SERVER = "archive.fabscan.org"

import semver
import logging
from fabscan.FSVersion import __version__

__author__ = 'mariolukas'


REMOTE_SERVER = "archive.fabscan.org"
PACKAGE_PATTERN = re.compile('^Package: fabscanpi-server$')

VERSION_PATTERN = re.compile('^Version: (.+)$')
_logger = logging.getLogger(__name__)

def get_build(version):
match = semver._REGEX.match(version)
if match is None:

if semver.Version.isvalid(version):
raise ValueError('%s is not valid SemVer string' % version)

verinfo = match.groupdict()
verinfo = semver.Version.parse(version)

if verinfo['build']:
return verinfo['build']
Expand Down

0 comments on commit b9108bb

Please sign in to comment.