Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(83)  |  Call(43)  |  Derive(0)  |  Import(40)

src/z/o/Zope2-2.13.22/src/OFS/Traversable.py   Zope2(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.unauthorized import Unauthorized
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import Acquired
from Acquisition import aq_acquire
                                    if not ok:
                                        if (container is not None or
                                            guarded_getattr(obj, name, _marker)
                                                is not next):
                                            raise Unauthorized(name)
                            if getattr(aq_base(obj), name, _marker) is not _marker:
                                if restricted:
                                    next = guarded_getattr(obj, name)
                                else:
                                    next = getattr(obj, name)
                        try:
                            if restricted:
                                next = guarded_getattr(obj, name, _marker)
                            else:
                                next = getattr(obj, name, _marker)

src/z/o/Zope-HEAD/src/OFS/Traversable.py   Zope(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.unauthorized import Unauthorized
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import Acquired
from Acquisition import aq_acquire
                                    if not ok:
                                        if (container is not None or
                                            guarded_getattr(obj, name, _marker)
                                                is not next):
                                            raise Unauthorized(name)
                            if getattr(aq_base(obj), name, _marker) is not _marker:
                                if restricted:
                                    next = guarded_getattr(obj, name)
                                else:
                                    next = getattr(obj, name)
                        try:
                            if restricted:
                                next = guarded_getattr(obj, name, _marker)
                            else:
                                next = getattr(obj, name, _marker)

src/c/o/collective.mrwiggin-0.1a2/collective/mrwiggin/traversable.py   collective.mrwiggin(Download)
from AccessControl import getSecurityManager
from AccessControl import Unauthorized
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import Acquired, aq_inner, aq_parent, aq_base
from zExceptions import NotFound
                        if not ok:
                            if (container is not None or
                                guarded_getattr(obj, name, _marker)
                                    is not next):
                                raise Unauthorized(name)
                else:
                    if getattr(aq_base(obj), name, _marker) is not _marker:
                        if restricted:
                            next = guarded_getattr(obj, name)
                    try:
                        if restricted:
                            next = guarded_getattr(obj, name, _marker)
                        else:
                            next = getattr(obj, name, _marker)
                        if not ok:
                            if (container is not None or
                                guarded_getattr(obj, name, _marker)
                                    is not next):
                                raise Unauthorized(name)

src/z/o/Zope2-2.13.22/src/Shared/DC/Scripts/Bindings.py   Zope2(Download)
from AccessControl.Permissions import view_management_screens
from AccessControl.PermissionRole import _what_not_even_god_should_do
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_parent
from Acquisition import aq_inner
            self.__you_lose()
 
        return guarded_getattr(self._wrapped, name, default)
        #return getattr(self._wrapped, name, default)
 

src/r/a/raptus.multilanguageurls-1.0a8/raptus/multilanguageurls/patches.py   raptus.multilanguageurls(Download)
from AccessControl.SecurityManagement import getSecurityManager
from AccessControl.unauthorized import Unauthorized
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_inner, aq_parent, aq_acquire, aq_base
from Acquisition.interfaces import IAcquirer
                        if not ok:
                            if (container is not None or
                                guarded_getattr(obj, name, _marker)
                                    is not next):
                                raise Unauthorized(name)
                else:
                    if getattr(aq_base(obj), name, _marker) is not _marker:
                        if restricted:
                            next = guarded_getattr(obj, name)
                    try:
                        if restricted:
                            next = guarded_getattr(obj, name, _marker)
                        else:
                            next = getattr(obj, name, _marker)

src/z/o/Zope-HEAD/src/Shared/DC/Scripts/Bindings.py   Zope(Download)
from AccessControl.Permissions import view_management_screens
from AccessControl.PermissionRole import _what_not_even_god_should_do
from AccessControl.ZopeGuards import guarded_getattr
from Acquisition import aq_parent
from Acquisition import aq_inner
            self.__you_lose()
 
        return guarded_getattr(self._wrapped, name, default)
        #return getattr(self._wrapped, name, default)
 

src/p/l/plone.namedfile-3.0.0/plone/namedfile/browser.py   plone.namedfile(Download)
from plone.namedfile.utils import set_headers, stream_data
 
from AccessControl.ZopeGuards import guarded_getattr
from Products.Five.browser import BrowserView
 
        else:
            context = getattr(self.context, 'aq_explicit', self.context)
            file = guarded_getattr(context, self.fieldname, None)
 
        if file is None:

src/p/l/plone.namedfile-HEAD/plone/namedfile/browser.py   plone.namedfile(Download)
from plone.namedfile.utils import set_headers, stream_data
 
from AccessControl.ZopeGuards import guarded_getattr
from Products.Five.browser import BrowserView
 
        else:
            context = getattr(self.context, 'aq_explicit', self.context)
            file = guarded_getattr(context, self.fieldname, None)
 
        if file is None:

src/p/r/Products.CompositePage-1.1/Products/CompositePage/designuis.py   Products.CompositePage(Download)
 
from AccessControl import ClassSecurityInfo
from AccessControl.ZopeGuards import guarded_getattr
from AccessControl.class_init import InitializeClass
from Acquisition import aq_inner
            obj = obj.restrictedTraverse(name)
            if IComposite.providedBy(obj):
                gen = guarded_getattr(obj, "generateSlots")
                gen()
        RESPONSE.redirect("%s/%s" % (
            if not ICompositeElement.providedBy(ob):
                raise ValueError("Not a composite element: %s" % path)
            m = guarded_getattr(ob, "queryInlineTemplate")
            template = m()
            if current is None:
                # using a non-string value.
                current = 0
            m = guarded_getattr(ob, "listAllowableInlineTemplates")
            templates = m()
            d = {}
        for ob in info["obs"]:
            assert ICompositeElement.providedBy(ob)
            m = guarded_getattr(ob, "setInlineTemplate")
            m(template)
        if REQUEST is not None:

src/e/r/erp5-HEAD/product/ERP5/Document/TextDocument.py   erp5(Download)
##############################################################################
 
from AccessControl.ZopeGuards import guarded_getattr
from AccessControl import ClassSecurityInfo
from zLOG import LOG, WARNING
      if method_id:
        try:
          method = guarded_getattr(self, method_id)
        except AttributeError:
          LOG('TextDocument', WARNING, 'could not get the substitution'

  1 | 2 | 3 | 4  Next