SAP / PyRFC

Asynchronous, non-blocking SAP NW RFC SDK bindings for Python
http://sap.github.io/PyRFC
Apache License 2.0
500 stars 132 forks source link

Connection configuration with unsupported option raises: AttributeError: 'NoneType' object has no attribute '_free' #329

Closed bsrdjan closed 1 year ago

bsrdjan commented 1 year ago

Describe the bug Connection configuration with unsupported option raises: AttributeError: 'NoneType' object has no attribute '_free'

To Reproduce Try to open connection with non-existing configuration option, like xtimeout

from pyrfc import Connection
try:
    c = Connection(config={"xtimeout": 123}, dest="MME")
except Exception as ex:
    print(ex)

Output

python ci/test/client_config.py
AttributeError: 'NoneType' object has no attribute '_free'
Exception ignored in: 'pyrfc._cyrfc.Connection.__del__'
Traceback (most recent call last):
  File "/Users/d037732/SAPDevelop/dev/sap/PyRFC/ci/test/client_config.py", line 4, in <module>
    c = Connection(config={"xtimeout": 123}, dest=sys.argv[1])
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute '_free'
Connection configuration option 'xtimeout' is not supported