Handle missing token exception

This commit is contained in:
Piotr Dobrowolski 2017-08-30 17:44:26 +02:00
parent e00189e21f
commit 2ac1b84133

2
vm.py
View File

@ -458,7 +458,7 @@ def main(gargv):
if __name__ == '__main__':
try:
exit(main(sys.argv[1:]))
except ovh.exceptions.InvalidCredential:
except (ovh.exceptions.InvalidCredential, ovh.exceptions.NotCredential):
req = ovh.Client().request_consumerkey([
{'method': 'GET', 'path': '/ip'},
{'method': 'GET', 'path': '/dedicated/server'},