# -*- coding: utf-8 -*-
##
-# Copyright 2015 Telefónica Investigación y Desarrollo, S.A.U.
+# Copyright 2015 Telefonica Investigacion y Desarrollo, S.A.U.
# This file is part of openmano
# All Rights Reserved.
#
try:
myvim[name]=id_
result=1
- except Exception, e:
+ except Exception as e:
result=-1
message= " " + str(type(e))[6:-1] + ": "+ str(e)
else:
try:
opts, args = getopt.getopt(sys.argv[1:], "hv:u:U:p:t:i:",
["username=", "help", "version=", "password=", "tenant=", "url=","skip-admin-tests",'image='])
- except getopt.GetoptError, err:
+ except getopt.GetoptError as err:
# print help information and exit:
print "Error:", err # will print something like "option -a not recognized"
usage()
user=creds['username'], passwd=creds['password'],
debug = False, config={'network_vlan_ranges':'physnet_sriov'} )
print " Ok"
- except Exception, e:
+ except Exception as e:
print " Fail"
print str(type(e))[6:-1] + ": "+ str(e)
exit(-1)
rollback_list.append(("creds", "tenant", creds["tenant_name"]))
rollback_list.append(("creds", "user", creds["username"]))
rollback_list.append(("creds", "passwd", creds["password"]))
- except Exception, e:
+ except Exception as e:
print " Fail"
print " Error setting osconnector to new tenant:", str(type(e))[6:-1] + ": "+ str(e)
exit(-1)