~verterok/ubuntuone-storage-protocol/load-all-available-certs

« back to all changes in this revision

Viewing changes to ubuntuone/storageprotocol/request.py

  • Committer: Tarmac
  • Author(s): Rodney Dawes
  • Date: 2013-08-02 15:05:35 UTC
  • mfrom: (161.1.2 fix-pyflakes)
  • Revision ID: tarmac-20130802150535-cdvqsmhgeqc1j4r4
Fix a typo (ensure vs assure).
Change the example-in-docstring to not look like a doctest.

Show diffs side-by-side

added added

removed removed

Lines of Context:
441
441
    def cancel_filter(self, function):
442
442
        """Raises RequestCancelledError if the request is cancelled.
443
443
 
444
 
        This methods exists to be used in a addCallback sequence to assure
 
444
        This methods exists to be used in a addCallback sequence to ensure
445
445
        that it does not continue if the request is cancelled, like:
446
446
 
447
 
        >>> d.addCallback(cancel_filter(foo))
448
 
        >>> d.addCallbacks(done_callback, error_errback)
 
447
        d.addCallback(cancel_filter(foo))
 
448
        d.addCallbacks(done_callback, error_errback)
449
449
 
450
450
        Note that you may receive RequestCancelledError in your
451
451
        'error_errback' func.