def manage_mode(mode):
    if mode is None:
        return None
    ret = str(mode).lstrip('0').zfill(4)
    if ret[0] != '0':
        return '0{0}'.format(ret)
    return ret
Return a mode value, normalized to a string
dataset/ETHPy150Open saltstack/salt/salt/client/ssh/wrapper/config.py/manage_mode