wrong repr returned for closed MongoClient instance

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.9.4
    • Affects Version/s: 2.9
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      To reproduce:

      In [1]: from pymongo import MongoClient
      In [2]: c = MongoClient()
      In [3]: c
      Out[3]: MongoClient('localhost', 27017)
      In [4]: c.close()
      In [5]: c
      Out[5]: <repr(<pymongo.mongo_client.MongoClient at 0x10331d9d0>) failed: TypeError: not enough arguments for format string>
      

              Assignee:
              Bernie Hackett
              Reporter:
              Jianbin Wei
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: