Dolda2000 GitWeb
/
pdm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix simplefunc return bug.
[pdm.git]
/
pdm
/
perf.py
diff --git
a/pdm/perf.py
b/pdm/perf.py
index
7c93c85
..
307dccb
100644
(file)
--- a/
pdm/perf.py
+++ b/
pdm/perf.py
@@
-51,6
+51,13
@@
__all__ = ["attrinfo", "simpleattr", "valueattr", "eventobj",
"staticdir", "event", "procevent", "startevent",
"finishevent"]
"staticdir", "event", "procevent", "startevent",
"finishevent"]
+class error(Exception):
+ pass
+class nosuchname(LookupError, error):
+ pass
+class nosuchproto(error):
+ pass
+
class attrinfo(object):
"""The return value of the `attrinfo' method on `attr' objects as
described in L{pdm.srv.perf}.
class attrinfo(object):
"""The return value of the `attrinfo' method on `attr' objects as
described in L{pdm.srv.perf}.
@@
-186,7
+193,7
@@
class simplefunc(perfobj):
def invoke(self, method, *args, **kwargs):
if method not in self.map:
raise AttributeError(method)
def invoke(self, method, *args, **kwargs):
if method not in self.map:
raise AttributeError(method)
- self.map[method](*args, **kwargs)
+
return
self.map[method](*args, **kwargs)
def pdm_protocols(self):
return super().pdm_protocols() + ["invoke"]
def pdm_protocols(self):
return super().pdm_protocols() + ["invoke"]