Skip to content

Commit 8f4eabe

Browse files
Jeny Sadadianuclearcat
authored andcommitted
src/timeout: fix datetime error
Fix the below error: ``` File "/home/kernelci/pipeline/src/timeout.py", line 119, in _get_available_nodes 'holdoff__lt': datetime.isoformat(datetime.utcnow()), ^^^^^^^^^^^^^^^^^^ AttributeError: module 'datetime' has no attribute 'isoformat' ``` Related to: #1277 Signed-off-by: Jeny Sadadia <[email protected]>
1 parent e56aa71 commit 8f4eabe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/timeout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def __init__(self, configs, args):
116116
def _get_available_nodes(self):
117117
nodes = self._api.node.find({
118118
'state': 'available',
119-
'holdoff__lt': datetime.isoformat(datetime.utcnow()),
119+
'holdoff__lt': datetime.datetime.isoformat(datetime.datetime.now(datetime.UTC)),
120120
})
121121
return {node['id']: node for node in nodes}
122122

0 commit comments

Comments
 (0)