_repr_helper of MongoClient mishandles socketTimeoutMS=None

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 3.3
    • Affects Version/s: 3.1, 3.2
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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

            Assignee:
            Bernie Hackett
            Reporter:
            Mihnea Dobrescu Balaur
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: