function: magic.revert

 revert to the orginal value the last patch modified.
        Raise ValueError if no such original value exists.
    
def revert(namespace, name):

origin:<UNKNOWN>

where:

exceptions that might appear during execution:

function source:

def revert(namespace, name):
    """ revert to the orginal value the last patch modified.
        Raise ValueError if no such original value exists.
    """
    nref = (namespace, name)
    if nref not in patched or not patched[nref]:
        raise ValueError, "No original value stored for %s.%s" % nref
    current = getattr(namespace, name)
    orig = patched[nref].pop()
    setattr(namespace, name, orig)
    return current

call sites:

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.0

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.1

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.2

called in /home/johnny/projects/merlinux/py/dist/py/magic/invoke.py

traceback magic.revert.3

called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py

traceback magic.revert.4

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.5

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.6

called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py

traceback magic.revert.7

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.8

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.9

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.10

called in /home/johnny/projects/merlinux/py/dist/py/test/deprecate.py

traceback magic.revert.11

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.12

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.13

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.14

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.15

called in /home/johnny/projects/merlinux/py/dist/py/magic/testing/test_patch.py

traceback magic.revert.16

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.17

called in /home/johnny/projects/merlinux/py/dist/py/magic/assertion.py

traceback magic.revert.18

called in None</home/johnny/projects/merlinux/py/dist/py/test/raises.py:20>

traceback magic.revert.19

called in /home/johnny/projects/merlinux/py/dist/py/test/deprecate.py

traceback magic.revert.20