Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
"""Routines that bypass file-system checks."""

import errno
import os

from oslo_utils import fileutils

from contego import exception
import contego.privsep


@contego.privsep.sys_admin_pctxt.entrypoint
def chown(path, uid=-1, gid=-1):
    if not os.path.exists(path):
        raise exception.FileNotFound(file_path=path)
    return os.chown(path, uid, gid)


class path(object):
    @staticmethod
    @contego.privsep.sys_admin_pctxt.entrypoint
    def exists(path):
        return os.path.exists(path)