Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-412

"name" attribute inconsistent in GridIn and GridOut

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4
    • Component/s: None
    • Labels:
      None

      Description

      Expected: GridIn supports both "name" and "filename" the same as GridOut.

      Actual: GridIn doesn't support "name".

      >>> db = Connection().test
      >>> gin.filename
      'fiddlesticks'
      >>> gin.name
      Traceback (most recent call last):
        File "<stdin>", line 1, in <module>
        File "gridfs/grid_file.py", line 170, in __getattr__
          raise AttributeError("GridIn object has no attribute '%s'" % name)
      AttributeError: GridIn object has no attribute 'name'
      >>> gin.close()
      >>> 
      >>> gout = GridFS(db).get(1)
      >>> gout.name
      u'fiddlesticks'
      >>> gout.filename
      u'fiddlesticks'

        Attachments

          Activity

            People

            Assignee:
            jesse A. Jesse Jiryu Davis
            Reporter:
            jesse A. Jesse Jiryu Davis
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: