[FIX] core: handle gevent on command line correctly
This commit is contained in:
committed by
Simon Lejeune
parent
630b4b1d55
commit
467a958ab0
+1
-8
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user