Skip to content

Commit

Permalink
Remove small outdated Python 2.5 syntax leftover.
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardomurri committed Oct 3, 2017
1 parent 91a6672 commit a9137d4
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions gc3libs/backends/slurm.py
Expand Up @@ -463,10 +463,8 @@ def _parse_timestamp(ts):
The 'standard' format for SLURM timestamps is ISO8601;
raise an error if any other format is detected.
"""
# XXX: datetime.strptime() only available starting Py 2.5
try:
return datetime.datetime(
*(time.strptime(ts, SlurmLrms._TIMEFMT_ISO8601)[0:6]))
return datetime.datetime.strptime(ts, SlurmLrms._TIMEFMT_ISO8601)
except ValueError as err:
gc3libs.log.error(
"Could not parse '%s' as an SLURM 'standard' (ISO8601)"
Expand Down

0 comments on commit a9137d4

Please sign in to comment.