Timeline overflow conditions + ver.

This commit is contained in:
Dpeta 2022-04-08 07:44:45 +02:00
parent 1635d66e71
commit c070745e26
3 changed files with 16 additions and 5 deletions

View file

@ -1,6 +1,11 @@
# Changelog
(This document uses YYYY-MM-DD)
## [v2.2.2] - 2022-03-26
### Fixed
- Timeline overflow conditions, time is now replaced with platform max/min on OverflowError.
## [v2.2.1] - 2022-03-26
### Fixed

View file

@ -68,9 +68,9 @@ def txt2delta(txt):
timed = timedelta(0)
except OverflowError:
if sign < 0:
return timedelta(min)
return timedelta.min
else:
return timedelta(max)
return timedelta.max
return sign*timed
def pcfGrammar(td):
@ -1022,7 +1022,13 @@ class PesterMemo(PesterConvo):
timed = time - datetime.now()
s = (timed.seconds // 60)*60
timed = timedelta(timed.days, s)
except ValueError:
except OverflowError:
if secs < 0:
timed = timedelta.min
else:
timed = timedelta.max
except (OSError, ValueError) as e:
print(e)
try:
if cmd == "i":
timed = timedelta(0)

View file

@ -1,2 +1,2 @@
_pcVersion = "Alt. v2.2.1"
buildVersion = "v2.2.1"
_pcVersion = "Alt. v2.2.2"
buildVersion = "v2.2.2"