mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-02 16:09:24 +01:00
Fixed a bug in getId and added a debug log to Spec.__call__.
This commit is contained in:
parent
8c4cbeb735
commit
72a7a22d4e
@ -214,6 +214,7 @@ def getId(irc, msg, args, state, kind=None):
|
|||||||
getInt(irc, msg, args, state, type=type)
|
getInt(irc, msg, args, state, type=type)
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
args[0] = original
|
args[0] = original
|
||||||
|
raise
|
||||||
|
|
||||||
def getExpiry(irc, msg, args, state):
|
def getExpiry(irc, msg, args, state):
|
||||||
now = int(time.time())
|
now = int(time.time())
|
||||||
@ -805,6 +806,7 @@ def wrap(f, specList=[], **kw):
|
|||||||
spec = Spec(specList, **kw)
|
spec = Spec(specList, **kw)
|
||||||
def newf(self, irc, msg, args, **kwargs):
|
def newf(self, irc, msg, args, **kwargs):
|
||||||
state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})
|
state = spec(irc, msg, args, stateAttrs={'cb': self, 'log': self.log})
|
||||||
|
self.log.debug('State before call: %s' % state)
|
||||||
f(self, irc, msg, args, *state.args, **state.kwargs)
|
f(self, irc, msg, args, *state.args, **state.kwargs)
|
||||||
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
return utils.changeFunctionName(newf, f.func_name, f.__doc__)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user