Catch and raise the exception when GetSession Fails.
[bootmanager.git] / source / BootAPI.py
index b3bbffb..6d16967 100644 (file)
@@ -51,7 +51,6 @@ def create_auth_structure( vars, call_params ):
         auth = auth_session
 
     except:
-        import traceback; traceback.print_exc()
         auth['AuthMethod']= 'hmac'
 
         try:
@@ -80,8 +79,8 @@ def create_auth_structure( vars, call_params ):
             auth = auth_session
 
         except Exception, e:
-            print e
-            pass
+            # NOTE: BM has failed to authenticate utterly.
+            raise BootManagerAuthenticationException, "%s" % e
 
     return auth