Skip to content

Commit

Permalink
Try ... except handling used to handle integer cycling.
Browse files Browse the repository at this point in the history
  • Loading branch information
arjclark committed Aug 5, 2014
1 parent 0c3d1a3 commit f196bda
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions lib/cylc/cfgspec/suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,26 +122,6 @@ def _coerce_cycletime_time_zone( value, keys, args ):
def _coerce_final_cycletime( value, keys, args ):
"""Coerce final cycle point."""
value = _strip_and_unquote( keys, value )
if "P" in str(value) or str(value).startswith("T"):
return value
if re.match(r"\d+$", value):
# Old date-time cycle point format, or integer format.
return value
if value.startswith("-") or value.startswith("+"):
# We don't know the value given for num expanded year digits...
for i in range(1, 101):
parser = TimePointParser(num_expanded_year_digits=i)
try:
parser.parse(value)
except ValueError:
continue
return value
raise IllegalValueError("cycle point", keys, value)
parser = TimePointParser()
try:
parser.parse(value)
except ValueError:
raise IllegalValueError("cycle point", keys, value)
return value


Expand Down

0 comments on commit f196bda

Please sign in to comment.