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

_repr_helper of MongoClient mishandles socketTimeoutMS=None

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 3.1, 3.2
    • 3.3
    • None
    • None

    Description

      Hello,

      According to the docs, one can set/leave socketTimeoutMS as None in order to not have a timeout. However, when you try to log/print any database/collection/client having this, you'll get a TypeError.

      The code here https://github.com/mongodb/mongo-python-driver/blob/master/pymongo/mongo_client.py#L842-L843 tries to format the socketTimeoutMS value, which is None, and can't be multiplied by 1000.

      Best,
      Mihnea

      Attachments

        Activity

          People

            bernie@mongodb.com Bernie Hackett
            mihneadb Mihnea Dobrescu Balaur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: