From 806648d611ceef5f12c812832118d8f6677012a0 Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Fri, 21 Mar 2014 16:56:05 +0100 Subject: [PATCH] [IMP] tools.exec_pg_command: hide command output bzr revid: chs@openerp.com-20140321155605-u96hd1da3rrrmcgg --- openerp/tools/misc.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/openerp/tools/misc.py b/openerp/tools/misc.py index 251905137c0..bb61fe2e7a2 100644 --- a/openerp/tools/misc.py +++ b/openerp/tools/misc.py @@ -3,7 +3,7 @@ # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (). -# Copyright (C) 2010-2013 OpenERP s.a. (). +# Copyright (C) 2010-2014 OpenERP s.a. (). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as @@ -83,7 +83,8 @@ def exec_pg_command(name, *args): raise Exception('Couldn\'t find %s' % name) args2 = (prog,) + args - return subprocess.call(args2) + with open(os.devnull) as dn: + return subprocess.call(args2, stdout=dn, stderr=subprocess.STDOUT) def exec_pg_command_pipe(name, *args): prog = find_pg_tool(name)