From: Frank Brehm Date: Fri, 18 Nov 2022 09:25:58 +0000 (+0100) Subject: Adding command line parameter 'timeout' to lib/pp_admintools/app/pdns.py X-Git-Tag: 0.7.2^2^2~6 X-Git-Url: https://git.uhu-banane.net/?a=commitdiff_plain;h=9ebb269f345d95eebe547787b87f90274b289644;p=pixelpark%2Fpp-admin-tools.git Adding command line parameter 'timeout' to lib/pp_admintools/app/pdns.py --- 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() # -------------------------------------------------------------------------