Ian Wienand 194ddff30a Handle empty reads as closed connections
When the new Opendev 3.2 Gerrit closes the SSH connection, gerritlib
goes into a hard loop.  Either this has never really worked, or our
new version of gerrit closes the SSH connection differently and
triggers this.

Currently the _read() function in this code interprets a 0 read as
data and continues the event loop.  This means the _listen() function
never exits.  The poll() keeps returning that there is a POLLIN event
and the _read() function keeps reading the empty FD.

Modify this to set the state to DISCONNECTED for a blank read.
Additionally improve the error message if we see invalid data (which
shouldn't happen).  Insert a short-circuit in the listen to check if
the state has switched to DISCONNECTED and exit the loop in that case.

Change-Id: I46849bcbfc3a0d409baa654867018994ce717481
2020-11-24 11:58:48 +11:00
2020-07-15 11:11:44 -07:00
2020-05-20 20:07:15 +01:00
2019-04-19 19:26:01 +00:00
2020-07-15 11:11:44 -07:00
2014-06-02 18:22:04 +02:00
2015-04-20 13:10:34 -07:00
2020-01-27 16:13:11 -08:00
2020-09-28 16:33:54 +00:00
2013-10-27 18:36:33 -04:00
2020-09-28 16:45:59 +01:00

README

Gerritlib is a Python library for interacting with Gerrit. It aims to provide a more conventionally pythonic way of managing a Gerrit instance.

To install:

$ sudo python setup.py install

Online documentation:

Developers

Bug report:

Repository:

Cloning:

git clone https://git.openstack.org/openstack-infra/gerritlib

Patches are submitted via Gerrit at:

Please do not submit GitHub pull requests, they will be automatically closed.

More details on how you can contribute is available on our wiki at:

Writing a patch

We ask that all code submissions be pep8 and pyflakes clean. The easiest way to do that is to run tox before submitting code for review in Gerrit. It will run pep8 and pyflakes in the same manner as the automated test suite that will run on proposed patchsets.

Installing without setup.py

Then install the required python packages using pip:

$ sudo pip install gerritlib
Description
Library for Gerrit
Readme 1.1 MiB
Languages
Python 100%