@ -163,7 +163,7 @@ def rax_find_volume(module, rax_module, name):
volume = cbs . find ( name = name )
volume = cbs . find ( name = name )
except rax_module . exc . NotFound :
except rax_module . exc . NotFound :
volume = None
volume = None
except Exception , e :
except Exception as e :
module . fail_json ( msg = ' %s ' % e )
module . fail_json ( msg = ' %s ' % e )
return volume
return volume
@ -302,7 +302,7 @@ def setup_rax_module(module, rax_module, region_required=True):
os . environ . get ( ' RAX_CREDS_FILE ' ) )
os . environ . get ( ' RAX_CREDS_FILE ' ) )
region = ( region or os . environ . get ( ' RAX_REGION ' ) or
region = ( region or os . environ . get ( ' RAX_REGION ' ) or
rax_module . get_setting ( ' region ' ) )
rax_module . get_setting ( ' region ' ) )
except KeyError , e :
except KeyError as e :
module . fail_json ( msg = ' Unable to load %s ' % e . message )
module . fail_json ( msg = ' Unable to load %s ' % e . message )
try :
try :
@ -317,7 +317,7 @@ def setup_rax_module(module, rax_module, region_required=True):
rax_module . set_credential_file ( credentials , region = region )
rax_module . set_credential_file ( credentials , region = region )
else :
else :
raise Exception ( ' No credentials supplied! ' )
raise Exception ( ' No credentials supplied! ' )
except Exception , e :
except Exception as e :
if e . message :
if e . message :
msg = str ( e . message )
msg = str ( e . message )
else :
else :