Example #1
0
            # retrigger the exception.
            test().asdf

        except AttributeError:
            # old form works.  See the 'else' for why we do this
            atom_overrides['__getattr__'] = atom_overrides['__getattr__nondesc']

        del test2

    except AttributeError:
        # function invocation succeeded, but blew up due to our test object
        # missing expected attributes.  This is fine- it was invocable at
        # least.  Means this python version doesn't support descriptor for
        # __getattr__
        pass
    atom_overrides.setdefault('__getattr__', atom_overrides['__getattr__desc'])
    del atom_overrides['__getattr__desc']
    del atom_overrides['__getattr__nondesc']
    del test

except ImportError:
    atom_overrides = native_atom_overrides


class atom(boolean.AndRestriction):

    """Currently implements gentoo ebuild atom parsing.

    Should be converted into an agnostic dependency base.
    """
Example #2
0
            test().asdf

        except AttributeError:
            # old form works.  See the 'else' for why we do this
            atom_overrides['__getattr__'] = atom_overrides[
                '__getattr__nondesc']

        del test2

    except AttributeError:
        # function invocation succeeded, but blew up due to our test object
        # missing expected attributes.  This is fine- it was invocable at
        # least.  Means this python version doesn't support descriptor for
        # __getattr__
        pass
    atom_overrides.setdefault('__getattr__', atom_overrides['__getattr__desc'])
    del atom_overrides['__getattr__desc']
    del atom_overrides['__getattr__nondesc']
    del test

except ImportError:
    atom_overrides = native_atom_overrides


class atom(boolean.AndRestriction):
    """Currently implements gentoo ebuild atom parsing.

    Should be converted into an agnostic dependency base.
    """

    # note we don't need _hash
Example #3
0
            # retrigger the exception.
            test().asdf

        except AttributeError:
            # old form works.  See the 'else' for why we do this
            atom_overrides["__getattr__"] = atom_overrides["__getattr__nondesc"]

        del test2

    except AttributeError:
        # function invocation succeeded, but blew up due to our test object
        # missing expected attributes.  This is fine- it was invocable at
        # least.  Means this python version doesn't support descriptor for
        # __getattr__
        pass
    atom_overrides.setdefault("__getattr__", atom_overrides["__getattr__desc"])
    del atom_overrides["__getattr__desc"]
    del atom_overrides["__getattr__nondesc"]
    del test

except ImportError:
    atom_overrides = native_atom_overrides


class atom(boolean.AndRestriction):

    """Currently implements gentoo ebuild atom parsing.

    Should be converted into an agnostic dependency base.
    """