mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
pep8
This commit is contained in:
parent
7564dac8cb
commit
6d33f97703
@ -26,7 +26,7 @@ CONDITIONAL_REQUIREMENTS = {
|
|||||||
|
|
||||||
def requirements(config=None, include_conditional=False):
|
def requirements(config=None, include_conditional=False):
|
||||||
reqs = REQUIREMENTS.copy()
|
reqs = REQUIREMENTS.copy()
|
||||||
for key,req in CONDITIONAL_REQUIREMENTS.items():
|
for key, req in CONDITIONAL_REQUIREMENTS.items():
|
||||||
if (config and getattr(config, key)) or include_conditional:
|
if (config and getattr(config, key)) or include_conditional:
|
||||||
reqs.update(req)
|
reqs.update(req)
|
||||||
return reqs
|
return reqs
|
||||||
@ -61,7 +61,8 @@ class MissingRequirementError(Exception):
|
|||||||
def check_requirements(config=None):
|
def check_requirements(config=None):
|
||||||
"""Checks that all the modules needed by synapse have been correctly
|
"""Checks that all the modules needed by synapse have been correctly
|
||||||
installed and are at the correct version"""
|
installed and are at the correct version"""
|
||||||
for dependency, module_requirements in requirements(config, include_conditional=False).items():
|
for dependency, module_requirements in (
|
||||||
|
requirements(config, include_conditional=False).items()):
|
||||||
for module_requirement in module_requirements:
|
for module_requirement in module_requirements:
|
||||||
if ">=" in module_requirement:
|
if ">=" in module_requirement:
|
||||||
module_name, required_version = module_requirement.split(">=")
|
module_name, required_version = module_requirement.split(">=")
|
||||||
|
Loading…
Reference in New Issue
Block a user