Changeset 59873e1 in sasview


Ignore:
Timestamp:
Aug 1, 2018 9:51:17 AM (5 months ago)
Author:
krzywon
Branches:
master, config-error, py37-all, py37-sascalc, py37-sasgui, pytest, setup_clean_up, simplify-c-build, ticket-1094-headless, ticket-1111, ticket-1205-fit-weights, ticket-1218, ticket-1220, unittest-saveload, win64bit_conda_vm
Children:
18faec7
Parents:
c1790a5
Message:

Remove any non-numeric characters from the version number when loading projects.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sascalc/fit/pagestate.py

    r3b070a0 r59873e1  
    1313################################################################################ 
    1414import time 
     15import re 
    1516import os 
    1617import sys 
     
    962963        if node.get('version'): 
    963964            # Get the version for model conversion purposes 
    964             self.version = tuple(int(e) for e in 
    965                                  str.split(node.get('version'), ".")) 
     965            x = re.sub('[^\d.]', '', node.get('version')) 
     966            self.version = tuple(int(e) for e in str.split(x, ".")) 
    966967            # The tuple must be at least 3 items long 
    967968            while len(self.version) < 3: 
Note: See TracChangeset for help on using the changeset viewer.