'Checks whether absolute path @abspath is the root in the soft-chrooted environment'

def is_root_abs(self, abspath):

    if (None == self.enabled):
        raise RuntimeError('SoftChroot    is    not    initialized')
    if (None == abspath):
        raise ValueError('abspath    can    not    be    None')
    if (not self.enabled):
        parent = os.path.dirname(abspath.rstrip(os.path.sep))
        return (parent == abspath)
    path = (abspath.rstrip(os.path.sep) + os.path.sep)
    return (self.chdir == path)
