Skip to content

Commit

Permalink
[FIX] undefined variable
Browse files Browse the repository at this point in the history
Variable was added to an error message, then inlined in only one of the
two callsites. Undefined variable error would only appear when an error
is triggered in the actual (postgres-level) backup call.

inserted in ec9a543

fixes odoo#5241
  • Loading branch information
xmo-odoo committed Feb 27, 2015
1 parent 68f14c6 commit 4bd2ee1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion openerp/tools/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,8 @@ def exec_pg_command(name, *args):
prog = find_pg_tool(name)
env = exec_pg_environ()
with open(os.devnull) as dn:
rc = subprocess.call((prog,) + args, env=env, stdout=dn, stderr=subprocess.STDOUT)
args2 = (prog,) + args
rc = subprocess.call(args2, env=env, stdout=dn, stderr=subprocess.STDOUT)
if rc:
raise Exception('Postgres subprocess %s error %s' % (args2, rc))

Expand Down

0 comments on commit 4bd2ee1

Please sign in to comment.