Skip to content
Snippets Groups Projects
Commit 683725d1 authored by Auke Klazema's avatar Auke Klazema
Browse files

SW-609: Replace old types

parent 1fa439b8
No related branches found
No related tags found
No related merge requests found
......@@ -33,7 +33,6 @@ from datetime import datetime, timedelta
from lofar.common.datetimeutils import parseDatetime
from lofar.sas.resourceassignment.resourceassigner.schedulechecker import movePipelineAfterItsPredecessors
import pprint
from types import IntType, FloatType, StringTypes
""" Prefix that is common to all parset keys, when we get a parset from OTDBRPC. """
......@@ -107,9 +106,9 @@ class Specification:
return timedelta(0)
elif input_value == "None":
return timedelta(0)
elif isinstance(input_value, IntType):
elif isinstance(input_value, int):
return timedelta(seconds=input_value)
elif isinstance(input_value, FloatType):
elif isinstance(input_value, float):
return timedelta(seconds=input_value)
else:
return input_value # todo: maybe raise an Exception instead?
......@@ -124,7 +123,7 @@ class Specification:
return None
elif input_value == "None":
return None
elif isinstance(input_value, StringTypes):
elif isinstance(input_value, str):
return parseDatetime(input_value)
else:
return input_value # todo: maybe raise an Exception instead?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment