From 9ebb269f345d95eebe547787b87f90274b289644 Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Fri, 18 Nov 2022 10:25:58 +0100 Subject: [PATCH] Adding command line parameter 'timeout' to lib/pp_admintools/app/pdns.py --- lib/pp_admintools/app/pdns.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/pp_admintools/app/pdns.py b/lib/pp_admintools/app/pdns.py index cedfedd..6f0a989 100644 --- a/lib/pp_admintools/app/pdns.py +++ b/lib/pp_admintools/app/pdns.py @@ -21,6 +21,7 @@ import socket import psutil # Own modules +from fb_tools import MAX_TIMEOUT from fb_tools.xlate import format_list from fb_pdnstools.zone import PowerDNSZone @@ -276,6 +277,14 @@ class PpPDNSApplication(BaseMailApplication): PdnsConfiguration.default_pdns_api_port), ) + help_msg=_( + "The timeout in seconds for the communication with the PowerDNS-API. " + "Default: {} seconds.").format(PdnsConfiguration.default_pdns_timeout) + pdns_group.add_argument( + '-T', '--timeout', meta=_("SECONDS"), type=int, dest='timeout', + help=help_msg, + ) + super(PpPDNSApplication, self).init_arg_parser() # ------------------------------------------------------------------------- -- 2.39.5