ajenti / ajenti

Function contains unused argument PYL-W0613
Anti-pattern
Major
6 months ago4 years old
Unused argument 'exception'
109                return output
110        return http_context.fallthrough(self.invalid)
111
112    def respond_error(self, http_context, exception):113        http_context.respond_server_error()
114        stack = traceback.format_exc()
115        traceback.print_exc()
Unused argument 'connection'
205            raise SudoError((o + e).decode('utf-8').splitlines()[-1].strip())
206        return True
207
208    def client_certificate_callback(self, connection, x509, errno, depth, result):209        if depth == 0 and (errno == 9 or errno == 10):
210            return False  # expired / not yet valid
211        if not aj.config.data['ssl']['client_auth']['force']:
Unused argument 'result'
205            raise SudoError((o + e).decode('utf-8').splitlines()[-1].strip())
206        return True
207
208    def client_certificate_callback(self, connection, x509, errno, depth, result):209        if depth == 0 and (errno == 9 or errno == 10):
210            return False  # expired / not yet valid
211        if not aj.config.data['ssl']['client_auth']['force']:
Unused argument 'http_context'
23
24    @get(r'/api/iptables')
25    @endpoint(api=True)
26    def handle_api_get_iptables(self, http_context):27        try:
28            chains_list = subprocess.check_output(f"{self.iptables} -L -n --line-numbers".split()).decode()
29        except Exception as e:
Unused argument 'http_context'
15
16    @get(r'/api/iptables/which')
17    @endpoint(api=True)
18    def handle_api_get_which_iptables(self, http_context):19        try:
20            self.iptables = subprocess.check_output(['which', 'iptables']).decode().strip()
21        except subprocess.CalledProcessError as e: