diff options
| author | Paul Ganssle <pganssle@users.noreply.github.com> | 2017-12-10 01:24:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-12-10 01:24:49 +0000 |
| commit | c43391f3f4f98a1724eb07f032ebe67e969fc312 (patch) | |
| tree | d18b58d4571c64ff41f55d3efa7ecc35e7f73859 /dateutil/parser | |
| parent | 40108c4b5b0ac6c3edcae422c86ce6d87a22d9dc (diff) | |
| parent | 13799fc557e74d779bef59c03d30bcaf566c716c (diff) | |
| download | dateutil-git-c43391f3f4f98a1724eb07f032ebe67e969fc312.tar.gz | |
Merge branch 'master' into build_methods
Diffstat (limited to 'dateutil/parser')
| -rw-r--r-- | dateutil/parser/isoparser.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/dateutil/parser/isoparser.py b/dateutil/parser/isoparser.py index 1550c3a..6ce9688 100644 --- a/dateutil/parser/isoparser.py +++ b/dateutil/parser/isoparser.py @@ -206,7 +206,10 @@ class isoparser(object): pos += 2 if pos >= len_str: - return components, pos + if has_sep: + return components, pos + else: + raise ValueError('Invalid ISO format') if has_sep: if dt_str[pos:pos + 1] != self._DATE_SEP: |
