Snake case

merge-requests/30/head
Bob Mottram 2021-12-25 18:29:29 +00:00
parent 07aa04947c
commit d5479e55d5
3 changed files with 18 additions and 18 deletions

View File

@ -1743,7 +1743,7 @@ class PubServer(BaseHTTPRequestHandler):
recordLoginFailure(base_dir, ipAddress, recordLoginFailure(base_dir, ipAddress,
self.server.loginFailureCount, self.server.loginFailureCount,
failTime, failTime,
self.server.logLoginFailures) self.server.log_login_failures)
self.server.POSTbusy = False self.server.POSTbusy = False
return return
else: else:
@ -18407,7 +18407,7 @@ def runDaemon(content_license_url: str,
max_like_count: int, max_like_count: int,
shared_items_federated_domains: [], shared_items_federated_domains: [],
user_agents_blocked: [], user_agents_blocked: [],
logLoginFailures: bool, log_login_failures: bool,
city: str, city: str,
showNodeInfoAccounts: bool, showNodeInfoAccounts: bool,
showNodeInfoVersion: bool, showNodeInfoVersion: bool,
@ -18728,7 +18728,7 @@ def runDaemon(content_license_url: str,
httpd.lastLoginTime = 0 httpd.lastLoginTime = 0
httpd.lastLoginFailure = 0 httpd.lastLoginFailure = 0
httpd.loginFailureCount = {} httpd.loginFailureCount = {}
httpd.logLoginFailures = logLoginFailures httpd.log_login_failures = log_login_failures
httpd.maxReplies = maxReplies httpd.maxReplies = maxReplies
httpd.tokens = {} httpd.tokens = {}
httpd.tokensLookup = {} httpd.tokensLookup = {}

View File

@ -342,8 +342,8 @@ parser.add_argument("--iconsAsButtons",
type=str2bool, nargs='?', type=str2bool, nargs='?',
const=True, default=False, const=True, default=False,
help="Show header icons as buttons") help="Show header icons as buttons")
parser.add_argument("--logLoginFailures", parser.add_argument("--log_login_failures",
dest='logLoginFailures', dest='log_login_failures',
type=str2bool, nargs='?', type=str2bool, nargs='?',
const=True, default=False, const=True, default=False,
help="Whether to log longin failures") help="Whether to log longin failures")
@ -3118,10 +3118,10 @@ brochMode = \
if brochMode is not None: if brochMode is not None:
args.brochMode = bool(brochMode) args.brochMode = bool(brochMode)
logLoginFailures = \ log_login_failures = \
getConfigParam(base_dir, 'logLoginFailures') getConfigParam(base_dir, 'log_login_failures')
if logLoginFailures is not None: if log_login_failures is not None:
args.logLoginFailures = bool(logLoginFailures) args.log_login_failures = bool(log_login_failures)
showNodeInfoAccounts = \ showNodeInfoAccounts = \
getConfigParam(base_dir, 'showNodeInfoAccounts') getConfigParam(base_dir, 'showNodeInfoAccounts')
@ -3216,7 +3216,7 @@ if __name__ == "__main__":
args.low_bandwidth, args.max_like_count, args.low_bandwidth, args.max_like_count,
shared_items_federated_domains, shared_items_federated_domains,
user_agents_blocked, user_agents_blocked,
args.logLoginFailures, args.log_login_failures,
args.city, args.city,
args.showNodeInfoAccounts, args.showNodeInfoAccounts,
args.showNodeInfoVersion, args.showNodeInfoVersion,

View File

@ -789,7 +789,7 @@ def createServerAlice(path: str, domain: str, port: int,
showNodeInfoAccounts = True showNodeInfoAccounts = True
showNodeInfoVersion = True showNodeInfoVersion = True
city = 'London, England' city = 'London, England'
logLoginFailures = False log_login_failures = False
user_agents_blocked = [] user_agents_blocked = []
max_like_count = 10 max_like_count = 10
default_reply_interval_hrs = 9999999999 default_reply_interval_hrs = 9999999999
@ -801,7 +801,7 @@ def createServerAlice(path: str, domain: str, port: int,
low_bandwidth, max_like_count, low_bandwidth, max_like_count,
shared_items_federated_domains, shared_items_federated_domains,
user_agents_blocked, user_agents_blocked,
logLoginFailures, city, log_login_failures, city,
showNodeInfoAccounts, showNodeInfoAccounts,
showNodeInfoVersion, showNodeInfoVersion,
brochMode, brochMode,
@ -931,7 +931,7 @@ def createServerBob(path: str, domain: str, port: int,
showNodeInfoAccounts = True showNodeInfoAccounts = True
showNodeInfoVersion = True showNodeInfoVersion = True
city = 'London, England' city = 'London, England'
logLoginFailures = False log_login_failures = False
user_agents_blocked = [] user_agents_blocked = []
max_like_count = 10 max_like_count = 10
default_reply_interval_hrs = 9999999999 default_reply_interval_hrs = 9999999999
@ -943,7 +943,7 @@ def createServerBob(path: str, domain: str, port: int,
low_bandwidth, max_like_count, low_bandwidth, max_like_count,
shared_items_federated_domains, shared_items_federated_domains,
user_agents_blocked, user_agents_blocked,
logLoginFailures, city, log_login_failures, city,
showNodeInfoAccounts, showNodeInfoAccounts,
showNodeInfoVersion, showNodeInfoVersion,
brochMode, brochMode,
@ -1000,7 +1000,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
showNodeInfoAccounts = True showNodeInfoAccounts = True
showNodeInfoVersion = True showNodeInfoVersion = True
city = 'London, England' city = 'London, England'
logLoginFailures = False log_login_failures = False
user_agents_blocked = [] user_agents_blocked = []
max_like_count = 10 max_like_count = 10
low_bandwidth = True low_bandwidth = True
@ -1013,7 +1013,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
low_bandwidth, max_like_count, low_bandwidth, max_like_count,
shared_items_federated_domains, shared_items_federated_domains,
user_agents_blocked, user_agents_blocked,
logLoginFailures, city, log_login_failures, city,
showNodeInfoAccounts, showNodeInfoAccounts,
showNodeInfoVersion, showNodeInfoVersion,
brochMode, brochMode,
@ -1072,7 +1072,7 @@ def createServerGroup(path: str, domain: str, port: int,
showNodeInfoAccounts = True showNodeInfoAccounts = True
showNodeInfoVersion = True showNodeInfoVersion = True
city = 'London, England' city = 'London, England'
logLoginFailures = False log_login_failures = False
user_agents_blocked = [] user_agents_blocked = []
max_like_count = 10 max_like_count = 10
low_bandwidth = True low_bandwidth = True
@ -1085,7 +1085,7 @@ def createServerGroup(path: str, domain: str, port: int,
low_bandwidth, max_like_count, low_bandwidth, max_like_count,
shared_items_federated_domains, shared_items_federated_domains,
user_agents_blocked, user_agents_blocked,
logLoginFailures, city, log_login_failures, city,
showNodeInfoAccounts, showNodeInfoAccounts,
showNodeInfoVersion, showNodeInfoVersion,
brochMode, brochMode,