From 465ad76281566958be40ac5d1e95cc3bf96aaa66 Mon Sep 17 00:00:00 2001 From: Aaron Guise Date: Mon, 14 Oct 2019 21:23:27 +0000 Subject: [PATCH] Add call to login test on instantiation of class --- lib/directadmin.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/directadmin.py b/lib/directadmin.py index cc159bb..8efe3e1 100644 --- a/lib/directadmin.py +++ b/lib/directadmin.py @@ -26,6 +26,13 @@ class DirectAdminClient: .encode()).decode('utf8'), } self.url = url + try: + response = self.login_test() + except DirectAdminClientException as e: + raise e + + + def make_request(self, endpoint, data=None): response = None # Empty response variable