• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

containerbuildsystem / osbs-client / 5172 / 4
84%
master: 84%

Build:
DEFAULT BRANCH: master
Ran 02 Oct 2020 02:09PM UTC
Files 0
Run time 0s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

02 Oct 2020 02:05PM UTC coverage: 0.0%. Remained the same
ACTION=pylint OS=fedora OS_VERSION=31 PYTHON_VERSION=3 ENGINE=docker

push

travis-ci

MartinBasti
HttpStream: fix close method

`.close()` is called from `__del__` and because this happend during
garbage collecting nothing is guaranted [1] and it results into following
traceback printed directly to stderr because it happened in GC context:
```
Traceback (most recent call last):
  File "/home/mbasti/repos-upstream/osbs-client/osbs/http.py", line 221, in __del__
    self.close()
  File "/home/mbasti/repos-upstream/osbs-client/osbs/http.py", line 214, in close
    if not self.closed:
AttributeError: 'HttpStream' object has no attribute 'closed'
```

Using getattr instead to avoid traceback.

TLDR: use context managers if you want to be sure that connection is closed
properly.

[1] https://docs.python.org/3/reference/datamodel.html#object.__del__

Signed-off-by: Martin Bašti <mbasti@redhat.com>

0 of 0 relevant lines covered (NaN%)

0.0 hits per line

Source Files on job 5172.4 (ACTION=pylint OS=fedora OS_VERSION=31 PYTHON_VERSION=3 ENGINE=docker)
  • Tree
  • List 0
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 715
  • Travis Job 5172.4
  • f21f4071 on github
  • Prev Job for ACTION=pylint OS=fedora OS_VERSION=31 PYTHON_VERSION=3 ENGINE=docker on master (#5156.4)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc