| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The ssh interface is still being used and patches are being
contributed [1].
It's easier to revert the removal on master than attempt to keep
the support in a separate branch.
This reverts commit f0b77968389966cd7bad0cac1fe7f04526eafde1.
[1] https://github.com/sonyxperiadev/pygerrit/pull/21
Conflicts:
README.rst
example.py
requirements.txt
setup.py
unittests.py
Change-Id: I9e02208c57cb2022ff39cff6650101ed40c0519d
|
| |
|
|
|
|
|
|
|
| |
From now only the REST API is supported.
This makes installation of the package a bit lighter as we no
longer depend on paramiko and pycrypto
Change-Id: Ieda773d596fd43047c05895f3304690ddf709094
|
| |
|
|
|
|
| |
* client.stop_event_stream() was not closing
Change-Id: Idf38565332a7865063caf614992ba376804da1a7
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit 06c88c8 (merged with pull request #13) added exception
handling:
except Exception as e:
which causes a pylint warning:
W0703: Catching too general exception Exception
However in this case we actually do want to catch all types
of exception because the intention is to make sure pygerrit
doesn't fall over when something unexpected happens.
Add a suppression of this warning. The suppression is only
effective on this particular line; the warning will be raised
again if we do the same thing again somewhere else.
Change-Id: If812d441c1dc625651db34c6d3763cedc98b68a9
|
| | |
|
| |
|
|
|
| |
Checking whether bytes are available is a non-blocking operation,
causing the receive loop to become a busy loop.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Instead of using select.select() to wait for input, use the methods
provided by paramiko's client channel object.
Read from both stdout and stderr, and send ErrorEvent if anything is
received on stderr.
Ref #1
Fix #12
Change-Id: Ic67392cb9d689a1f457f5d02eb17a5432112a0c0
|
| |
|
|
|
|
|
|
|
|
| |
Pass the raw string into the event factory and parse it to a json
object there. If the string is not valid json, generate an error
event.
Add a unit test for handling of invalid json on the event stream.
Change-Id: I209a89fd28c3a594b71443fc106e25d58c5cc1ea
|
| |
|
|
|
|
|
|
| |
select.poll() does not work on all platforms.
Replace it with select.select().
Change-Id: Iadd09127c99b5b47ebc28f6f4e57fcc1eb4c8710
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the copyright and license headers are in module docstrings, they
appear in the generated API documentation pages and it looks crappy.
Instead, put the headers in regular Python comments. Thus each file
still has the required copyright and license notice, but it is not
included everywhere in the generated documentation.
The documentation still includes an automatically generated copyright
notice at the bottom of each page.
Change-Id: Ibc5f4ca221c0a6de26f04f3b4511d8991e28b663
|
| |
|
|
| |
Change-Id: I6bc8d92ed1055959f1c24128b8beace814eaf998
|
| |
|
|
|
|
|
|
| |
When the stream-event command fails, for example due to bad
host name, the result is not initialised. However the code
was accessing the result variable which caused an exception.
Change-Id: I6c649dba447e33733dfaea6e742152277fa7374f
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Handle exceptions with the syntax:
except Exception as e
rather than:
except Exception, e
Change-Id: I883fdc1db541b9d2699712bfd2bd328261635005
|
| |
|
|
|
|
|
|
| |
Add a new class GerritSSHCommandResult to encapsulate the stdin,
stdout, and stderr streams that are returned from running a
command over SSH.
Change-Id: Ic851c195ac63e530e62198eb7e0af62c2fbd73d5
|
| |
|
|
|
|
|
|
|
| |
In version 0.26 of pylint the message enable/disable options are
changed. Update the configuration to reflect this.
Also remove redundant suppressions.
Change-Id: Ia6e4c6c79cd573dfc91aec53b32c58930fbbde55
|
| |
|
|
| |
Change-Id: I283773fb6b68da1878ede9001d18b5b7d0aff569
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handle IOError and ValueError separately from GerritError when
processing the steam. In this case GerritError is raised if
there is a problem adding an event to the queue; it makes no
sense to then try to add an error event on the same queue.
Add separate handling of GerritError when running the gerrit
stream-events command.
Move the creation of the error event out to a utility method.
Change-Id: Iac5aa8db5ad1a444fd0e6217c32d1800f727276e
|
| |
|
|
| |
Change-Id: I7ad27a83d5af3eaca7a188e01cbef392c9ff1b6b
|
| |
|
|
|
|
|
| |
Handle IOError that can occur when reading from the stream,
and ValueError that can be raised by the JSON parser.
Change-Id: Ic9dc60e048f0f747daf8b34c7b6d8d90c11bb1e0
|
| |
|
|
|
|
|
| |
So it can be reused in query functionality that will be added
later.
Change-Id: I361aaf8fe8aa9107a94757606a3a1837b6a448ab
|
| |
|
|
| |
Change-Id: I25ce3fafe7a51d0221f66fe30b2fb7cc8115c4aa
|
| |
|
|
|
|
|
|
| |
When setting up and reading the gerrit event stream, catch
errors and dispatch them to the gerrit client as a new error
event type, `GerritStreamErrorEvent`.
Change-Id: Ide51dc4882450dca67ee419f3702aa4fb415cf09
|
| |
|
|
| |
Change-Id: I4953be92719fddeb7c23c2559ffe954c452cc131
|
| |
|
|
|
|
|
|
|
|
|
| |
Refactor so that the input stream is passed into the constructor,
instead of as a parameter to the "stream" method. Rename the
"stream" method to "read".
Add a check that the given input stream has a read() method and
raise exception if not.
Change-Id: I5ff917847a6abde124f64cc808a68ec05e5a1c2b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new static class GerritEventFactory which provides:
- Decorator method to register event names to classes
- Method to instantiate an event class based on event name
The stream implementation is refactored to use the factory to
generate the events.
With this change it will be possible to add new event classes
without having to modify the stream handler implementation.
Change-Id: If1fd0b4f77ead320e98a56301d8266d66dcc8aca
|
| |
|
|
|
|
| |
http://www.python.org/dev/peps/pep-0257/
Change-Id: I1469a94f01660ef00aac196a5ca8995b3803a4bd
|
|
|
Data models, events, errors, and stream handler are split from the
single module into submodules.
Change-Id: I03537c5e268135966c6b6e77ecaca1cb579a5fde
|