Snake case

main
Bob Mottram 2021-12-25 18:35:24 +00:00
parent 72727ef690
commit 091b576d3c
4 changed files with 28 additions and 28 deletions

View File

@ -1136,7 +1136,7 @@ class PubServer(BaseHTTPRequestHandler):
brochMode = brochModeIsActive(self.server.base_dir)
nodeInfoVersion = self.server.projectVersion
if not self.server.showNodeInfoVersion or brochMode:
if not self.server.show_node_info_version or brochMode:
nodeInfoVersion = '0.0.0'
show_node_info_accounts = self.server.show_node_info_accounts
@ -5553,14 +5553,14 @@ class PubServer(BaseHTTPRequestHandler):
setConfigParam(base_dir, "show_node_info_accounts",
show_node_info_accounts)
showNodeInfoVersion = False
if fields.get('showNodeInfoVersion'):
if fields['showNodeInfoVersion'] == 'on':
showNodeInfoVersion = True
self.server.showNodeInfoVersion = \
showNodeInfoVersion
setConfigParam(base_dir, "showNodeInfoVersion",
showNodeInfoVersion)
show_node_info_version = False
if fields.get('show_node_info_version'):
if fields['show_node_info_version'] == 'on':
show_node_info_version = True
self.server.show_node_info_version = \
show_node_info_version
setConfigParam(base_dir, "show_node_info_version",
show_node_info_version)
verifyAllSignatures = False
if fields.get('verifyallsignatures'):
@ -18410,7 +18410,7 @@ def runDaemon(content_license_url: str,
log_login_failures: bool,
city: str,
show_node_info_accounts: bool,
showNodeInfoVersion: bool,
show_node_info_version: bool,
brochMode: bool,
verifyAllSignatures: bool,
sendThreadsTimeoutMins: int,
@ -18504,7 +18504,7 @@ def runDaemon(content_license_url: str,
httpd.signingPrivateKeyPem = None
httpd.show_node_info_accounts = show_node_info_accounts
httpd.showNodeInfoVersion = showNodeInfoVersion
httpd.show_node_info_version = show_node_info_version
# ASCII/ANSI text banner used in shell browsers, such as Lynx
httpd.textModeBanner = getTextModeBanner(base_dir)

View File

@ -388,7 +388,7 @@ parser.add_argument("--nodeinfoaccounts",
const=True, default=False,
help="Show numbers of accounts within nodeinfo metadata")
parser.add_argument("--nodeinfoversion",
dest='showNodeInfoVersion',
dest='show_node_info_version',
type=str2bool, nargs='?',
const=True, default=False,
help="Show version number within nodeinfo metadata")
@ -3128,10 +3128,10 @@ show_node_info_accounts = \
if show_node_info_accounts is not None:
args.show_node_info_accounts = bool(show_node_info_accounts)
showNodeInfoVersion = \
getConfigParam(base_dir, 'showNodeInfoVersion')
if showNodeInfoVersion is not None:
args.showNodeInfoVersion = bool(showNodeInfoVersion)
show_node_info_version = \
getConfigParam(base_dir, 'show_node_info_version')
if show_node_info_version is not None:
args.show_node_info_version = bool(show_node_info_version)
low_bandwidth = \
getConfigParam(base_dir, 'low_bandwidth')
@ -3219,7 +3219,7 @@ if __name__ == "__main__":
args.log_login_failures,
args.city,
args.show_node_info_accounts,
args.showNodeInfoVersion,
args.show_node_info_version,
args.brochMode,
args.verifyAllSignatures,
args.sendThreadsTimeoutMins,

View File

@ -787,7 +787,7 @@ def createServerAlice(path: str, domain: str, port: int,
verifyAllSignatures = True
brochMode = False
show_node_info_accounts = True
showNodeInfoVersion = True
show_node_info_version = True
city = 'London, England'
log_login_failures = False
user_agents_blocked = []
@ -803,7 +803,7 @@ def createServerAlice(path: str, domain: str, port: int,
user_agents_blocked,
log_login_failures, city,
show_node_info_accounts,
showNodeInfoVersion,
show_node_info_version,
brochMode,
verifyAllSignatures,
sendThreadsTimeoutMins,
@ -929,7 +929,7 @@ def createServerBob(path: str, domain: str, port: int,
verifyAllSignatures = True
brochMode = False
show_node_info_accounts = True
showNodeInfoVersion = True
show_node_info_version = True
city = 'London, England'
log_login_failures = False
user_agents_blocked = []
@ -945,7 +945,7 @@ def createServerBob(path: str, domain: str, port: int,
user_agents_blocked,
log_login_failures, city,
show_node_info_accounts,
showNodeInfoVersion,
show_node_info_version,
brochMode,
verifyAllSignatures,
sendThreadsTimeoutMins,
@ -998,7 +998,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
verifyAllSignatures = True
brochMode = False
show_node_info_accounts = True
showNodeInfoVersion = True
show_node_info_version = True
city = 'London, England'
log_login_failures = False
user_agents_blocked = []
@ -1015,7 +1015,7 @@ def createServerEve(path: str, domain: str, port: int, federationList: [],
user_agents_blocked,
log_login_failures, city,
show_node_info_accounts,
showNodeInfoVersion,
show_node_info_version,
brochMode,
verifyAllSignatures,
sendThreadsTimeoutMins,
@ -1070,7 +1070,7 @@ def createServerGroup(path: str, domain: str, port: int,
verifyAllSignatures = True
brochMode = False
show_node_info_accounts = True
showNodeInfoVersion = True
show_node_info_version = True
city = 'London, England'
log_login_failures = False
user_agents_blocked = []
@ -1087,7 +1087,7 @@ def createServerGroup(path: str, domain: str, port: int,
user_agents_blocked,
log_login_failures, city,
show_node_info_accounts,
showNodeInfoVersion,
show_node_info_version,
brochMode,
verifyAllSignatures,
sendThreadsTimeoutMins,

View File

@ -1358,12 +1358,12 @@ def _htmlEditProfileInstance(base_dir: str, translate: {},
nodeInfoStr = \
translate['Show version number within instance metadata']
if getConfigParam(base_dir, "showNodeInfoVersion"):
if getConfigParam(base_dir, "show_node_info_version"):
instanceStr += \
editCheckBox(nodeInfoStr, 'showNodeInfoVersion', True)
editCheckBox(nodeInfoStr, 'show_node_info_version', True)
else:
instanceStr += \
editCheckBox(nodeInfoStr, 'showNodeInfoVersion', False)
editCheckBox(nodeInfoStr, 'show_node_info_version', False)
if getConfigParam(base_dir, "verifyAllSignatures"):
instanceStr += \