[FIX] core: handle gevent on command line correctly

This commit is contained in:
Christophe Simonis
2016-09-30 12:05:49 +02:00
committed by Simon Lejeune
parent 630b4b1d55
commit 467a958ab0
4 changed files with 11 additions and 12 deletions
+1 -8
View File
@@ -153,14 +153,7 @@ def main():
elif len(sys.argv) == 2 and sys.argv[1] in cmds:
cmds[sys.argv[1]]()
else:
if len(sys.argv) > 1 and sys.argv[1] == 'gevent':
sys.argv.remove('gevent')
import gevent.monkey
gevent.monkey.patch_all()
import psycogreen.gevent
psycogreen.gevent.patch_psycopg()
import odoo
odoo.cli.main()
sys.exit('Unknow command. Command available: %r' % (cmds.keys(),))
if __name__ == "__main__":
main()