Skip to content

Commit

Permalink
Config RC fix
Browse files Browse the repository at this point in the history
  • Loading branch information
lucas-wilkins committed Oct 4, 2024
1 parent 8e24f52 commit 7199d02
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/sas/system/config/config_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,12 @@ def load_from_file_object(self, file):

try:
file_version = data["sasview_version"]
# Use the distutils strict version module regex to check if the version string is valid
# This is based on distutils strict version module regex to check if the version string is valid
# ref: https://epydoc.sourceforge.net/stdlib/distutils.version.StrictVersion-class.html
matcher = re.compile(r'(?x)^(\d+)\.(\d+)(\.(\d+))?([ab](\d+))?$')
#
# We've decided not to be strict, so it has been modified to include rc and RC
#
matcher = re.compile(r'(?x)^(\d+)\.(\d+)(\.(\d+))?((a|b|rc|RC)(\d+))?$')
if not matcher.match(file_version):
raise Exception

Expand Down

0 comments on commit 7199d02

Please sign in to comment.