Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
683725d1
Commit
683725d1
authored
6 years ago
by
Auke Klazema
Browse files
Options
Downloads
Patches
Plain Diff
SW-609
: Replace old types
parent
1fa439b8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
SAS/ResourceAssignment/Common/lib/specification.py
+3
-4
3 additions, 4 deletions
SAS/ResourceAssignment/Common/lib/specification.py
with
3 additions
and
4 deletions
SAS/ResourceAssignment/Common/lib/specification.py
+
3
−
4
View file @
683725d1
...
...
@@ -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
,
I
nt
Type
):
elif
isinstance
(
input_value
,
i
nt
):
return
timedelta
(
seconds
=
input_value
)
elif
isinstance
(
input_value
,
F
loat
Type
):
elif
isinstance
(
input_value
,
f
loat
):
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
,
S
tr
ingTypes
):
elif
isinstance
(
input_value
,
s
tr
):
return
parseDatetime
(
input_value
)
else
:
return
input_value
# todo: maybe raise an Exception instead?
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment