Compare commits

...

2 Commits

Author SHA1 Message Date
0d3e515909 Fix binary symlinks 2017-08-30 17:44:47 +02:00
2ac1b84133 Handle missing token exception 2017-08-30 17:44:26 +02:00

4
vm.py
View File

@ -34,7 +34,7 @@ import ovh
import ovh.exceptions
from collections import namedtuple
BASE = os.path.dirname(os.path.abspath(__file__))
BASE = os.path.dirname(os.path.realpath(__file__))
config = {
'vg': '/dev/vg',
@ -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'},