[FIX] odoo shell: P3 compatibility when reading script from stdin

This commit is contained in:
Christophe Simonis
2017-09-20 11:31:21 +02:00
parent fb3ee11649
commit 30b1b89496
+1 -1
View File
@@ -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])