summaryrefslogtreecommitdiff
path: root/odoo/cli/shell.py
diff options
context:
space:
mode:
authorChristophe Simonis <chs@odoo.com>2018-02-02 13:36:32 +0100
committerChristophe Simonis <chs@odoo.com>2018-02-02 13:36:32 +0100
commitdc8698132af9b5735d9729a3068951f287d2fc2e (patch)
tree063a5e758fb0de53075dc0a27839660add6303a5 /odoo/cli/shell.py
parentdccdff2539a673c3a0f88c15ebdce849b12ffb15 (diff)
[IMP] odoo shell: set expected `__name__` for scripts read from stdin
Name of scripts piped to `odoo shell` were `__builtin__` (`builtins` in python3), which is not really obvious (and awful if your script must handle python2 and python3). Change it to `__main__`, allowing to use to common pattern `if __name__ == '__main__':`
Diffstat (limited to 'odoo/cli/shell.py')
0 files changed, 0 insertions, 0 deletions