add docstrings to print_ciphers() and display_peercert()
This commit is contained in:
parent
ee233e65e0
commit
028f7ae2de
1 changed files with 11 additions and 2 deletions
13
statusd.py
13
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)
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue