Add a trailing slash to the proxmox url (fixes #15)

This commit is contained in:
Xabi Ezpeleta 2019-03-15 09:39:49 +01:00
parent 3499d2f7be
commit ba77d56258
1 changed files with 4 additions and 0 deletions

View File

@ -127,6 +127,10 @@ class ProxmoxAPI(object):
elif not options.password:
raise Exception(
'Missing mandatory parameter --password (or PROXMOX_PASSWORD or "password" key in config file).')
# URL should end with a trailing slash
if not options.url.endswith("/"):
options.url = options.url + "/"
def auth(self):
request_path = '{0}api2/json/access/ticket'.format(self.options.url)