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

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

Build:
DEFAULT BRANCH: master
Ran 02 Oct 2020 02:12PM UTC
Files 25
Run time 3s
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: 83.103%. Remained the same
OS=fedora OS_VERSION=30 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>

3546 of 4267 relevant lines covered (83.1%)

0.83 hits per line

Source Files on job 5172.6 (OS=fedora OS_VERSION=30 PYTHON_VERSION=3 ENGINE=docker)
  • Tree
  • List 0
  • Changed 1
  • Source Changed 1
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 715
  • Travis Job 5172.6
  • f21f4071 on github
  • Prev Job for OS=fedora OS_VERSION=30 PYTHON_VERSION=3 ENGINE=docker on master (#5156.6)
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