'Checks whether @abspath is subdir (on any level) of soft-chroot'

def is_subdir(self, abspath):

    if (None == self.enabled):
        raise RuntimeError('SoftChroot    is    not    initialized')
    if (None == abspath):
        return False
    if (not self.enabled):
        return True
    if (not abspath.endswith(os.path.sep)):
        abspath += os.path.sep
    return abspath.startswith(self.chdir)
