sys.exit() GCP Cloud Function

Viewed 1125

Have written GCP Cloud Function in Python 3.7. While executing, sys.exit() I'm getting 'A server error occurred ...'. I need to exit out of the function and have written following code.

import sys 
if str(strEnabled) == 'True':
        printOperation = "Operation: Enabling of user" 
else:
        sys.exit() #Exit From the Program

Please suggest, what I'm missing here.

1 Answers
Related