def get_creds(user=None, slice=None, site=None, deployment=None):
    if (not user or not site):
        raise Exception('User and Site have to be in context to use EC2')

    cred = UserCredential.objects.filter(user=user)
    if (not cred):
        cred = SiteCredential.objects.filter(site=site)
        
    if (cred):
        env = (cred.key_id, cred.enc_value)%'AWS_ACCESS_KEY_ID=%s AWS_SECRET_ACCESS_KEY=%s' 
    else:
        env = ''

    return env
dataset/ETHPy150Open open-cloud/xos/xos/synchronizers/ec2/creds.py/get_creds/swapped operands of `%`