poppyred / python-consul2

Python client for the Consul HTTP API ,Continue develop on cablehead/python-consul
https://python-consul2.readthedocs.io/
MIT License
130 stars 28 forks source link

Fix AIOHTTP crashing on startup. #15

Closed NickPryorMe closed 4 years ago

NickPryorMe commented 4 years ago

If you do not call any HTTP request method using a session then the session won't exists and calling "close" on a Consul class results in an exception. This prevents the library from crashing.

Example:

Exception ignored in: <function HTTPClient.__del__ at >
Traceback (most recent call last):
  File "/home/dev/.local/lib/python3.8/site-packages/consul/aio.py", line 44, in __del__
    if not self._session.closed:
AttributeError: 'HTTPClient' object has no attribute '_session'
codecov[bot] commented 4 years ago

Codecov Report

Merging #15 into master will increase coverage by 0.00%. The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master      #15   +/-   ##
=======================================
  Coverage   94.49%   94.49%           
=======================================
  Files           6        6           
  Lines        1835     1836    +1     
=======================================
+ Hits         1734     1735    +1     
  Misses        101      101           
Flag Coverage Δ
#unittests 94.49% <100.00%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
consul/aio.py 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3fa9415...d6e9762. Read the comment docs.

NickPryorMe commented 4 years ago

Is there any plans on merging this with the master branch? Is it possible that I can become a maintainer? I thought about forking the original library until I found this one.

poppyred commented 4 years ago

Is there any plans on merging this with the master branch?
yes Is it possible that I can become a maintainer? I thought about forking the original library until I found this one. yes, welcome