Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
Zope
Commits
0896cba7
Commit
0896cba7
authored
20 years ago
by
Andreas Jung
Browse files
Options
Download
Email Patches
Plain Diff
wrapped the complete DateTime parser magic into try..except
for a better and unique error handling
parent
fc3032e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
lib/python/DateTime/DateTime.py
lib/python/DateTime/DateTime.py
+9
-0
No files found.
lib/python/DateTime/DateTime.py
View file @
0896cba7
...
...
@@ -497,6 +497,15 @@ class DateTime:
SyntaxError
=
SyntaxError
def
__init__
(
self
,
*
args
,
**
kw
):
"""Return a new date-time object"""
try
:
return
self
.
_parse_args
(
*
args
,
**
kw
)
except
:
raise
SyntaxError
(
'Unable to parse %s, %s'
%
(
args
,
kw
))
def
_parse_args
(
self
,
*
args
,
**
kw
):
"""Return a new date-time object
A DateTime object always maintains its value as an absolute
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment