summaryrefslogtreecommitdiff
path: root/chat/tootstream/patches/patch-src_tootstream_toot.py
diff options
context:
space:
mode:
Diffstat (limited to 'chat/tootstream/patches/patch-src_tootstream_toot.py')
-rw-r--r--chat/tootstream/patches/patch-src_tootstream_toot.py34
1 files changed, 34 insertions, 0 deletions
diff --git a/chat/tootstream/patches/patch-src_tootstream_toot.py b/chat/tootstream/patches/patch-src_tootstream_toot.py
new file mode 100644
index 00000000000..5f9f6845fce
--- /dev/null
+++ b/chat/tootstream/patches/patch-src_tootstream_toot.py
@@ -0,0 +1,34 @@
+$NetBSD: patch-src_tootstream_toot.py,v 1.1 2018/07/31 16:15:33 nia Exp $
+
+'async' is a reserved keyword in Python 3.7.
+
+--- src/tootstream/toot.py.orig 2018-05-31 00:06:11.000000000 +0000
++++ src/tootstream/toot.py
+@@ -1279,11 +1279,11 @@ def stream(mastodon, rest):
+
+ try:
+ if rest == "home" or rest == "":
+- handle = mastodon.stream_user(toot_listener, async=True)
++ handle = mastodon.stream_user(toot_listener, run_async=True)
+ elif rest == "fed" or rest == "public":
+- handle = mastodon.stream_public(toot_listener, async=True)
++ handle = mastodon.stream_public(toot_listener, run_async=True)
+ elif rest == "local":
+- handle = mastodon.stream_local(toot_listener, async=True)
++ handle = mastodon.stream_local(toot_listener, run_async=True)
+ elif rest.startswith('list'):
+ # Remove list from the rest string
+ items = rest.split('list ')
+@@ -1295,10 +1295,10 @@ def stream(mastodon, rest):
+ cprint("List {} is not found".format(items[-1]), fg('red'))
+ return
+
+- handle = mastodon.stream_list(item, toot_listener, async=True)
++ handle = mastodon.stream_list(item, toot_listener, run_async=True)
+ elif rest.startswith('#'):
+ tag = rest[1:]
+- handle = mastodon.stream_hashtag(tag, toot_listener, async=True)
++ handle = mastodon.stream_hashtag(tag, toot_listener, run_async=True)
+ else:
+ handle = None
+ print("Only 'home', 'fed', 'local', 'list', and '#hashtag' streams are supported.")