def safelower(s):
    try:
        return s.lower()
    except AttributeError:
        return s
As string.lower(), but return `s` if something goes wrong.
dataset/ETHPy150Open twisted/ldaptor/ldaptor/entryhelpers.py/safelower