Exit If Statement

I'm confused and stucked when im trying to quit/ continue in if statement

def checkQuota():
    with open("Discord\Test Field\config.json", "r+") as file:
        data = json.load(file)
        quota = data['guild setting']['daily quota']
        if quota > 0:

I want to check if quota is not 0 then continue for execution, but when quota equals to 0, I want it to stop at there. Anyone can help me?


Solution 1:

def checkQuota():
    with open(r"Discord\Test Field\config.json", "r+") as file:
        data = json.load(file)

    quota = data['guild setting']['daily quota']
    if quota == 0:
        # out of quota
        return

    # ...rest of the function below