diff --git a/src/Mod/OpenSCAD/OpenSCADUtils.py b/src/Mod/OpenSCAD/OpenSCADUtils.py index 4fbac7d018..5c11e6060f 100644 --- a/src/Mod/OpenSCAD/OpenSCADUtils.py +++ b/src/Mod/OpenSCAD/OpenSCADUtils.py @@ -100,7 +100,11 @@ def workaroundforissue128needed(): see https://github.com/openscad/openscad/issues/128''' vdate=getopenscadversion().split('-')[0] vdate=vdate.split(' ')[2].split('.') - year,mon=int(vdate[0]),int(vdate[1]) + if len(vdate) == 1: # probably YYYYMMDD format (i.e. git version) + vdate = vdate[0] + year, mon = int("".join(vdate[0:4])), int("".join(vdate[4:6])) + else: # YYYY.MM(.DD?) (latest release) + year,mon=int(vdate[0]),int(vdate[1]) return (year<2012 or (year==2012 and (mon <6 or (mon == 6 and \ (len(vdate)<3 or int(vdate[2]) <=23))))) #ifdate=int(vdate[0])+(int(vdate[1])-1)/12.0