]> source.dussan.org Git - rspamd.git/commitdiff
Merge branch 'master' into rspamadm-coroutines 2461/head
authorMikhail Galanin <mgalanin@mimecast.com>
Mon, 10 Sep 2018 10:02:47 +0000 (11:02 +0100)
committerMikhail Galanin <mgalanin@mimecast.com>
Mon, 10 Sep 2018 10:02:47 +0000 (11:02 +0100)
1  2 
src/rspamadm/confighelp.c
test/functional/lib/rspamd.py

Simple merge
index 1c4b428a27d9f011b060ff713d57915f60f46434,5673a10d98698fd9a63b164687bb420bb031511f..eeb5f27997080de41e29d84d469e6eb3bd63d06a
@@@ -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
++