mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-02-21 10:01:54 +00:00
windows yamlutil.safe_load returns None when files are unreadable
This commit is contained in:
parent
72f17a3834
commit
3d35723a59
@ -296,6 +296,8 @@ def create_introducer_clients(config, main_tub):
|
|||||||
try:
|
try:
|
||||||
with introducers_filepath.open() as f:
|
with introducers_filepath.open() as f:
|
||||||
introducers_yaml = yamlutil.safe_load(f)
|
introducers_yaml = yamlutil.safe_load(f)
|
||||||
|
if introducers_yaml is None:
|
||||||
|
introducers_yaml = {}
|
||||||
introducers = introducers_yaml.get("introducers", {})
|
introducers = introducers_yaml.get("introducers", {})
|
||||||
log.msg(
|
log.msg(
|
||||||
"found {} introducers in private/introducers.yaml".format(
|
"found {} introducers in private/introducers.yaml".format(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user