Merge pull request #25 from hosfeld/master

Fixed UnboundLocalError
This commit is contained in:
Xabi 2020-04-02 11:05:31 +02:00 committed by GitHub
commit 846ac723cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -205,7 +205,7 @@ class ProxmoxAPI(object):
ip_address = None
networks = self.get('api2/json/nodes/{0}/qemu/{1}/agent/network-get-interfaces'.format(node, vm))['result']
if networks:
if type(network) is dict:
if type(networks) is dict:
for network in networks:
for address in network['ip-addresses']:
ip_address = address['ip-address']