Bubble [main]
Updated for GmCapsule v0.5 API changes
[1mdiff --git a/50_bubble.py b/50_bubble.py[m
[1mindex 7e8f062..47774df 100644[m
[1m--- a/50_bubble.py[m
[1m+++ b/50_bubble.py[m
[36m@@ -619,8 +619,8 @@[m [mwhen the administrator assigns at least one moderator to it.[m
return make_feed_page(session)[m
[m
[m
[31m-def init(capsule):[m
[31m- cfg = capsule.config()[m
[32m+[m[32mdef init(context):[m
[32m+[m[32m cfg = context.config()[m
try:[m
mod_cfg = cfg.section('bubble')[m
[m
[36m@@ -636,15 +636,16 @@[m [mdef init(capsule):[m
port = cfg.section('server').getint('port', 1965)[m
[m
for hostname in hostnames:[m
[31m- responder = Bubble(capsule, hostname, port, path, mod_cfg)[m
[31m- capsule.add(path + '*', responder, hostname, protocol='gemini')[m
[31m- capsule.add(path + '*', responder, hostname, protocol='titan')[m
[32m+[m[32m responder = Bubble(context, hostname, port, path, mod_cfg)[m
[32m+[m[32m context.add(path + '*', responder, hostname, protocol='gemini')[m
[32m+[m[32m context.add(path + '*', responder, hostname, protocol='titan')[m
[m
[31m- emailer = Emailer(capsule, hostnames[0], port, mod_cfg)[m
[31m- emailer.start()[m
[32m+[m[32m if context.is_background_work_allowed():[m
[32m+[m[32m emailer = Emailer(context, hostnames[0], port, mod_cfg)[m
[32m+[m[32m emailer.start()[m
[m
[31m- fetcher = RepoFetcher(capsule, mod_cfg)[m
[31m- fetcher.start()[m
[32m+[m[32m fetcher = RepoFetcher(context, mod_cfg)[m
[32m+[m[32m fetcher.start()[m
[m
except KeyError:[m
pass[m