From: Oleg Broytman Date: Sun, 15 Oct 2017 13:26:58 +0000 (+0300) Subject: Cleanup: Fix flake8 E306 expected 1 blank line before a nested definition, found 0 X-Git-Tag: 2.8.0~21 X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=007287d33830efbbe7659e68fbf24769b926b31b;p=mimedecode.git Cleanup: Fix flake8 E306 expected 1 blank line before a nested definition, found 0 --- diff --git a/mimedecode.py b/mimedecode.py index 0ec5e79..69af1ac 100755 --- a/mimedecode.py +++ b/mimedecode.py @@ -342,10 +342,12 @@ def _save_message(msg, outstring, save_headers=False, save_body=False): global output save_output = output outfile = open_output_file(fname) + def _output_bytes(s): if not isinstance(s, bytes): s = s.encode(g.default_encoding, "replace") outfile.write(s) + output = _output_bytes if save_headers: output_headers(msg)