Skip to content

Conversation

@solarfly73
Copy link

KeyError is given when threading library (which has been patched) exits.

See http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run
for a detailed explanation of the problem with loading the threading lib
before gevent.monkey.patch_thread() is called.

Replication:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import pssh
(CTRL-D)
Exception KeyError: KeyError(140521151242640,) in <module 'threading'
from '/usr/lib/python2.7/threading.pyc'> ignored

In contrast, monkey patching before import logging allows a clean exit
(import logging loads the threading lib).

KeyError is given when threading library (which has been patched) exits.

See http://stackoverflow.com/questions/8774958/keyerror-in-module-threading-after-a-successful-py-test-run
for a detailed explanation of the problem with loading the threading lib
before gevent.monkey.patch_thread() is called.

Replication:
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pssh
>>> (CTRL-D)
Exception KeyError: KeyError(140521151242640,) in <module 'threading'
from '/usr/lib/python2.7/threading.pyc'> ignored

In contrast, monkey patching before import logging allows a clean exit
(import logging loads the threading lib).
@pkittenis
Copy link
Member

Duplicate of #46 - resolved on master branch:

$ python
Python 2.7.6 (default, Jun 22 2015, 17:58:13) 
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pssh
>>> 
$ 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants