commit | 513075030021c381957d7ad42de63b1dedca2201 | [log] [tgz] |
---|---|---|
author | Daniel Gruno <humbedooh@apache.org> | Mon Mar 01 09:57:00 2021 +0100 |
committer | GitHub <noreply@github.com> | Mon Mar 01 09:57:00 2021 +0100 |
tree | 67123f29c4b62b40f6ab8d434ab6045c14787341 | |
parent | 193e87ce961b891a75ce03c9b9ba62852ff76ca1 [diff] |
only attempt write if there is something to write
diff --git a/aardvark.py b/aardvark.py index c5c8e1d..91fc0f4 100644 --- a/aardvark.py +++ b/aardvark.py
@@ -138,7 +138,7 @@ if isinstance(post, multidict.MultiDictProxy): for k, v in post.items(): await f.write(f"{k}={v}\n") - else: + elif post and isinstance(post, bytes): await f.write(str(post, encoding="utf-8")) def scan_simple(self, request_url: str, post_data: bytes = None):