Timeline overflow conditions + ver.
This commit is contained in:
parent
1635d66e71
commit
c070745e26
3 changed files with 16 additions and 5 deletions
|
@ -1,6 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
(This document uses YYYY-MM-DD)
|
(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
|
## [v2.2.1] - 2022-03-26
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
12
memos.py
12
memos.py
|
@ -68,9 +68,9 @@ def txt2delta(txt):
|
||||||
timed = timedelta(0)
|
timed = timedelta(0)
|
||||||
except OverflowError:
|
except OverflowError:
|
||||||
if sign < 0:
|
if sign < 0:
|
||||||
return timedelta(min)
|
return timedelta.min
|
||||||
else:
|
else:
|
||||||
return timedelta(max)
|
return timedelta.max
|
||||||
return sign*timed
|
return sign*timed
|
||||||
|
|
||||||
def pcfGrammar(td):
|
def pcfGrammar(td):
|
||||||
|
@ -1022,7 +1022,13 @@ class PesterMemo(PesterConvo):
|
||||||
timed = time - datetime.now()
|
timed = time - datetime.now()
|
||||||
s = (timed.seconds // 60)*60
|
s = (timed.seconds // 60)*60
|
||||||
timed = timedelta(timed.days, s)
|
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:
|
try:
|
||||||
if cmd == "i":
|
if cmd == "i":
|
||||||
timed = timedelta(0)
|
timed = timedelta(0)
|
||||||
|
|
|
@ -1,2 +1,2 @@
|
||||||
_pcVersion = "Alt. v2.2.1"
|
_pcVersion = "Alt. v2.2.2"
|
||||||
buildVersion = "v2.2.1"
|
buildVersion = "v2.2.2"
|
||||||
|
|
Loading…
Reference in a new issue