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

"name" attribute inconsistent in GridIn and GridOut

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.4
    • Affects Version/s: None
    • Component/s: None
    • None

      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'
      

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

              Created:
              Updated:
              Resolved: