summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2017-09-20 11:31:21 +0200
committerChristophe Simonis <chs@odoo.com>2017-09-20 11:31:21 +0200
commit30b1b89496a1648cdac1257aec3da9c149f67da7 (patch)
tree15751b6492cf41809d1adcdf64f2b096e63a63bd
parentfb3ee116499cb7bf8aae1263e5aeb1224b641716 (diff)
[FIX] odoo shell: P3 compatibility when reading script from stdin
-rw-r--r--odoo/cli/shell.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/cli/shell.py b/odoo/cli/shell.py
index 0aaa9ab2d84..e75e453a231 100644
--- a/odoo/cli/shell.py
+++ b/odoo/cli/shell.py
@@ -63,7 +63,7 @@ class Shell(Command):
def console(self, local_vars):
if not os.isatty(sys.stdin.fileno()):
- exec(sys.stdin, local_vars)
+ exec(sys.stdin.read(), local_vars)
else:
if 'env' not in local_vars:
print('No environment set, use `%s shell -d dbname` to get one.' % sys.argv[0])