Commits

Cameron Simpson committed df6b80a Merge

Automated merge with ssh://home/hg/css

  • Participants
  • Parent commits 2789af0, 767a4e2

Comments (0)

Files changed (1)

lib/python/cs/later.py

       if state == STATE_CANCELLED:
         # silently discard result
         pass
-      elif state == STATE_RUNNING:
+      elif state == STATE_RUNNING or state == STATE_PENDING:
         if self._result is not None:
           raise ValueError("<%s>.result.setter: tried to set .result to %r but .result is already: %r"
                            % (self, new_result, self._result))
         self.state = STATE_DONE
         notifiers = list(self.notifiers)
       else:
-        raise RuntimeError("<%s>.state is one of (STATE_CANCELLED, STATE_RUNNING): %r"
+        raise RuntimeError("<%s>.state is not one of (STATE_CANCELLED, STATE_RUNNING): %r"
                            % (self, state))
     for notifier in notifiers:
       notifier(self)