Skip to content

Commit

Permalink
small type checking fix
Browse files Browse the repository at this point in the history
  • Loading branch information
dkmstr committed Nov 24, 2023
1 parent 740f20d commit 42c2fd0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions server/src/uds/services/OpenNebula/on/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,11 +253,12 @@ def getDisplayConnection(
except Exception:
passwd = ''

lastChild: typing.Any = md.getElementsByTagName('HISTORY_RECORDS')[0].lastChild
host = (
md.getElementsByTagName('HISTORY_RECORDS')[0]
.lastChild.getElementsByTagName('HOSTNAME')[0]
lastChild.getElementsByTagName('HOSTNAME')[0]
.childNodes[0]
.data
if lastChild else ''
)
return {'type': type_, 'host': host, 'port': int(port), 'passwd': passwd}

Expand Down

0 comments on commit 42c2fd0

Please sign in to comment.