def rm(path):
    os.remove(path)
    try:
        os.removedirs(os.path.split(path)[0])
    except OSError:
        pass
Helper function to check permissions
dataset/ETHPy150Open Floobits/floobits-sublime/floo/common/utils.py/rm--crossover with--dataset/ETHPy150Open sahana/eden/modules/s3db/dvr.py/DVRRegisterCaseEvent.permitted