Skip to content

timeval options do not have symmetric set/get  #95

@encukou

Description

@encukou

Issue description:

Infinite timeout is set using a negative number, but turns into None when retreived.
Setting timeout to None leads to an internal error.

>>> import ldap
>>> conn = ldap.initialize('https://example.com')
>>> conn.set_option(ldap.OPT_NETWORK_TIMEOUT, -1)
>>> print(conn.get_option(ldap.OPT_NETWORK_TIMEOUT))
None
>>> conn.set_option(ldap.OPT_NETWORK_TIMEOUT, None)
Traceback (most recent call last):
  ...
SystemError: <built-in method set_option of LDAP object at 0x7f943715dd78> returned a result with an error set

Operating system: Fedora
Python version: 3.6.3
python-ldap version: 3.0.0b1
Imported from https://sourceforge.net/p/python-ldap/bugs/48/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy