Uploaded image for project: 'Couchbase Python Client Library'
  1. Couchbase Python Client Library
  2. PYCBC-348

access_ok method of SubdocResult broken when it should return False

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • 2.1.0
    • 2.0.9
    • library
    • None

    Description

      Typo in result.py triggers AttributeError when evaluating return condition since LCB_SUBDOC_MULTI_FAILRUE does not exist:

      AttributeError                            Traceback (most recent call last)
      <ipython-input-48-480e33981320> in <module>()
            9 print "Content of SubdocResult is: {0}".format(subDocumentNoField.get(missingFieldToRetrieve))
           10 
      ---> 11 subDocumentNoField.access_ok
       
      /Users/simon/anaconda2/lib/python2.7/site-packages/couchbase/result.pyc in access_ok(self)
          154         :return: True if the document is accessible, False otherwise
          155         """
      --> 156         return self.rc == 0 or self.rc == C.LCB_SUBDOC_MULTI_FAILRUE
          157 
          158     @property
       
      AttributeError: 'module' object has no attribute 'LCB_SUBDOC_MULTI_FAILRUE'
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            mnunberg Mark Nunberg (Inactive)
            sleigh Simon Leigh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty