From: Mikhail Galanin Date: Mon, 10 Sep 2018 10:02:47 +0000 (+0100) Subject: Merge branch 'master' into rspamadm-coroutines X-Git-Tag: 1.8.0~155^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2461%2Fhead;p=thirdparty%2Frspamd.git Merge branch 'master' into rspamadm-coroutines --- 6990ef3daa64ad7ab9724dbb20cea92e243fb46a diff --cc test/functional/lib/rspamd.py index 1c4b428a27,5673a10d98..eeb5f27997 --- a/test/functional/lib/rspamd.py +++ b/test/functional/lib/rspamd.py @@@ -212,12 -212,8 +212,18 @@@ def shutdown_process_with_children(pid) except: pass - +def write_to_stdin(process_handle, text): + lib = BuiltIn().get_library_instance('Process') + obj = lib.get_process_object() + obj.stdin.write(text + "\n") + obj.stdin.flush() + obj.stdin.close() + out = obj.stdout.read(4096) + return out ++ + def get_file_if_exists(file_path): + if os.path.exists(file_path): + with open(file_path, 'r') as myfile: + return myfile.read() + return None ++