From 29e7d0481ea82453eabce3317718e2dc5c9ebd00 Mon Sep 17 00:00:00 2001
From: Dan Mills <dmills@qumulo.com>
Date: Wed, 15 May 2024 18:45:08 +0000
Subject: [PATCH] Move handle_exception to WapiBase

---
 plugins/module_utils/api.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/plugins/module_utils/api.py b/plugins/module_utils/api.py
index 3a586193..9ce87c48 100644
--- a/plugins/module_utils/api.py
+++ b/plugins/module_utils/api.py
@@ -248,9 +248,6 @@ def _invoke_method(self, name, *args, **kwargs):
             else:
                 raise
 
-
-class WapiLookup(WapiBase):
-    ''' Implements WapiBase for lookup plugins '''
     def handle_exception(self, method_name, exc):
         if ('text' in exc.response):
             raise Exception(exc.response['text'])
@@ -258,6 +255,11 @@ def handle_exception(self, method_name, exc):
             raise Exception(exc)
 
 
+class WapiLookup(WapiBase):
+    ''' Implements WapiBase for lookup plugins '''
+    pass
+
+
 class WapiInventory(WapiBase):
     ''' Implements WapiBase for dynamic inventory script '''
     pass