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

rohanpm / kobo
50%
master: 49%

Build:
Build:
LAST BUILD BRANCH: remove-auto-logout
DEFAULT BRANCH: master
Repo Added 06 Oct 2018 07:15AM UTC
Files 109
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

LAST BUILD ON BRANCH middleware-TypeError
branch: middleware-TypeError
CHANGE BRANCH
x
Reset
  • middleware-TypeError
  • 0.8.0
  • fix-middleware-compat
  • fork-task-log-exceptions
  • logging-thread-py3
  • logging-thread-recover
  • refactored-gssapi
  • release-via-travis
  • remove-auto-logout
  • retire-content-delivery-release-bot
  • test-improvements

pending completion
25

push

travis-ci

rohanpm
Fix middleware TypeError where ImproperlyConfigured was expected

"getattr(settings, var, [])" is not a valid way of defaulting
any empty value into an empty list. If the value is present but
None, it will evaluate to None, which then crashes due to
attempting to evaluate "value not in None". Rewrite it to tolerate
values which are present but None.

Additionally, using hasattr together with a call to getattr
providing a default value is pointless, so it was dropped.
The default value in getattr only applies if the object doesn't
have the attribute, in which case we can't possibly have passed
the hasattr check, so the former default of [] was never used.

In practice, this would happen with MIDDLEWARE on some versions
of Django, which globally defaults to None. This was a low impact
bug, since it only converted one type of crash into another.

3059 of 6120 relevant lines covered (49.98%)

0.5 hits per line

Relevant lines Covered
Build:
Build:
6120 RELEVANT LINES 3059 COVERED LINES
0.5 HITS PER LINE
Source Files on middleware-TypeError
  • Tree
  • List 109
  • Changed 0
  • Source Changed 0
  • Coverage Changed 0
Coverage ∆ File Lines Relevant Covered Missed Hits/Line

Recent builds

Builds Branch Commit Type Ran Committer Via Coverage
25 middleware-TypeError Fix middleware TypeError where ImproperlyConfigured was expected "getattr(settings, var, [])" is not a valid way of defaulting any empty value into an empty list. If the value is present but None, it will evaluate to None, which then crashes due ... push 25 Jun 2020 11:14PM UTC rohanpm travis-ci pending completion  
See All Builds (15)
  • Repo on GitHub
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

© 2025 Coveralls, Inc