Fixed PESTERCHUM:TIME> related crash
This commit is contained in:
parent
0804bf16eb
commit
d231f2f785
2 changed files with 17 additions and 7 deletions
|
@ -1,6 +1,12 @@
|
|||
# Changelog
|
||||
(This document uses YYYY-MM-DD)
|
||||
|
||||
## [v2.1.3.1] - 2021-9-18
|
||||
|
||||
### Fixed
|
||||
- Crash for certain invalid values of PESTERCHUM:TIME>
|
||||
|
||||
|
||||
## [v2.1.3.1] - 2021-8-24
|
||||
|
||||
### Added
|
||||
|
|
18
memos.py
18
memos.py
|
@ -1021,14 +1021,18 @@ class PesterMemo(PesterConvo):
|
|||
s = (timed.seconds // 60)*60
|
||||
timed = timedelta(timed.days, s)
|
||||
except ValueError:
|
||||
if cmd == "i":
|
||||
timed = timedelta(0)
|
||||
else:
|
||||
if cmd[len(cmd)-1] == 'c':
|
||||
close = timeProtocol(cmd)
|
||||
timed = None
|
||||
try:
|
||||
if cmd == "i":
|
||||
timed = timedelta(0)
|
||||
else:
|
||||
timed = timeProtocol(cmd)
|
||||
if cmd[len(cmd)-1] == 'c':
|
||||
close = timeProtocol(cmd)
|
||||
timed = None
|
||||
else:
|
||||
timed = timeProtocol(cmd)
|
||||
except:
|
||||
PchumLog.warning("Invalid PESTERCHUM:TIME> " + str(cmd))
|
||||
timed = timedelta(0)
|
||||
|
||||
if handle in self.times:
|
||||
if close is not None:
|
||||
|
|
Loading…
Reference in a new issue