From 028f7ae2deea6f1b14eafb90a1167dc32c0af898 Mon Sep 17 00:00:00 2001 From: berhsi Date: Fri, 13 Sep 2019 10:29:38 +0200 Subject: [PATCH] add docstrings to print_ciphers() and display_peercert() --- statusd.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/statusd.py b/statusd.py index 8a5ba7f..890ab7c 100755 --- a/statusd.py +++ b/statusd.py @@ -13,7 +13,7 @@ import os import logging import json from time import time, ctime, sleep -from sys import exit, byteorder +from sys import exit def read_config(CONFIGFILE, CONFIG): @@ -80,6 +80,11 @@ def print_config(CONFIG): def print_ciphers(cipherlist): + ''' + This function prints the list of the allowed ciphers. + param1: dictionary + return: boolean + ''' print('Available ciphers') for i in cipherlist: print('\n') @@ -90,6 +95,11 @@ def print_ciphers(cipherlist): def display_peercert(cert): + ''' + This function displays the values of a given certificate. + param1: dictionary + return: boolean + ''' for i in cert.keys(): print('{}:'.format(i)) if i in ('subject', 'issuer'): @@ -206,7 +216,6 @@ def read_loglevel(CONFIG): elif CONFIG['VERBOSITY'] == 'debug': loglevel = logging.DEBUG else: loglevel = False - print(loglevel) return(loglevel)