Minor improvement

Return the variable instead of doing useless check

Change-Id: I4c5893157f396c3f4bf6ef9d18ff1692af2c5b33
This commit is contained in:
Fei Long Wang 2015-03-18 16:02:47 +13:00
parent ec68634d91
commit cf365fe40d

@ -345,7 +345,7 @@ class DecayingTimer(object):
maximum = kwargs.pop('maximum', None)
if self._duration is None:
return None if maximum is None else maximum
return maximum
if self._ends_at is None:
raise RuntimeError(_("Can not check/return a timeout from a timer"
" that has not been started."))