[FIX] odoo shell: P3 compatibility when reading script from stdin
This commit is contained in:
+1
-1
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user