grpc: fixed creating session directory if need be when starting session, before setting config state, avoids path not existing error

This commit is contained in:
Blake Harnden 2020-12-09 10:05:13 -08:00
parent 836e929fbc
commit d824fbd1c6

View file

@ -221,9 +221,9 @@ class CoreGrpcServer(core_pb2_grpc.CoreApiServicer):
# clear previous state and setup for creation
session.clear()
session.set_state(EventTypes.CONFIGURATION_STATE)
if not os.path.exists(session.session_dir):
os.mkdir(session.session_dir)
session.set_state(EventTypes.CONFIGURATION_STATE)
# location
if request.HasField("location"):