Fix session in CLI on Debian systems

Change-Id: I4b1a3e45417a8d8442e097d440ebee8a09a8aaa2
This commit is contained in:
Łukasz Oleś 2016-01-22 09:38:37 +01:00
parent c80a0d401e
commit 47162e68dd

View File

@ -23,7 +23,7 @@ shouldn't be used from long running processes (workers etc)
def create_all():
import sys
if not sys.executable.endswith(('python', )):
if sys.executable.split('/')[-1] not in ['python', 'python2']:
# auto add session to only standalone python runs
return