Permalink
Comparing changes
Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also
.
Open a pull request
Create a new pull request by comparing changes across two branches. If you need to, you can also .
Choose a Base Repository
Pylons/webob
0xngold/webob
B-Rich/webob
Batterii/webob
Codonaut/webob
Craga89/webob
CreamCoderz/webob
Cykooz/webob
FashtimeDotCom/webob
GordonSchmidt/webob
Ivoz/webob
JelleZijlstra/webob
Mereostr/webob
Natim/webob
PlumpMath/webob
SmartTeleMax/webob
ViktorL/webob
XiaooDai/webob
YuanrongZheng/webob
adamchainz/webob
alenjun/webob
alertedsnake/webob
almet/webob
amol-/webob
amotl/webob
anaer/webob
aodag/webob
bertjwregeer/webob
brotchie/webob
bukzor/webob
caton-wang/webob
cdellin/webob
cdunklau/webob
charlescbeebe/webob
chimobb/webob
chris-morgan/webob
chrismorales/webob
cjford/webob
coltonlw/webob
cwebber/webob
cymoo/webob
dairiki/webob
danielerez/webob
danielholmstrom/webob
deuxpi/webob
devIORA/webob
dirkmueller/webob
dobesv/webob
domenkozar/webob
doulbekill/webob
dstufft/webob
e42s/webob
echlebek/webob
faassen/webob
fortara/webob
google-feinberg/webob
gosom/webob
gotostack/webob
greghaynes/webob
hayate/webob
htang2013/webob
ianb/webob
invisibleroads/webob
inytar/webob
jd/webob
jeremydw/webob
jimbaker/webob
jinty/webob
jmwhitfi/webob
joebos/webob
jonatasoliveira/webob
joulez/webob
jturmel/webob
julienmeyer/webob
k-hasan-19/webob
koansys/webob
kthguru/webob
lakshmi-kannan/webob
lasson/webob
lieryan/webob
lmctv/webob
lrowe/webob
ltvolks/webob
lukecyca/webob
madhawa1206/webob
maisano/webob
martinth/webob
mateuszklimek/webob
melon-li/webob
metalman/webob
meteogrid/webob
michilu/webob
minddistrict/webob
miohtama/webob
mitchellrj/webob
mmerickel/webob
moriyoshi/webob
mpirnat/webob
mrmuxl/webob
msabramo/webob
mtawaken/webob
mvidner/webob
narendasan/webob
nickstenning/webob
nirs/webob
nkunal/webob
nphilipp/webob
oas89/webob
openprocurement/webob
panpan-zhang/webob
perey/webob
proppy/webob
pubkraal/webob
py-web/webob
qq40660/webob
quantum-omega/webob
rclmenezes/webob
rjungbeck/webob
rogerioyuuki/webob
ryanpetrello/webob
ryd994/webob
rylz/webob
saschpe/webob
shashankchakelam/webob
sigmavirus24/webob
sileht/webob
simudream/webob
slyang-git/webob
smal/webob
sontek/webob
squirro/webob
stevepiercy/webob
sunyi00/webob
suryakencana007/webob
tailgunnerbeavis/webob
tbkraf08/webob
tc1989tc/webob
techigin/webob
thaisvergani/webob
thefuture2092/webob
toanant/webob
tshepang/webob
wdvill/webob
wenxueliu/webob
whiteroses/webob
witsch/webob
xpahos/webob
xuweiwei2011/webob
yoniLavi/webob
young001/webob
yws/webob
zuiwanting/webob-Pylons
Nothing to show
Choose a base branch
Choose a Head Repository
Pylons/webob
0xngold/webob
B-Rich/webob
Batterii/webob
Codonaut/webob
Craga89/webob
CreamCoderz/webob
Cykooz/webob
FashtimeDotCom/webob
GordonSchmidt/webob
Ivoz/webob
JelleZijlstra/webob
Mereostr/webob
Natim/webob
PlumpMath/webob
SmartTeleMax/webob
ViktorL/webob
XiaooDai/webob
YuanrongZheng/webob
adamchainz/webob
alenjun/webob
alertedsnake/webob
almet/webob
amol-/webob
amotl/webob
anaer/webob
aodag/webob
bertjwregeer/webob
brotchie/webob
bukzor/webob
caton-wang/webob
cdellin/webob
cdunklau/webob
charlescbeebe/webob
chimobb/webob
chris-morgan/webob
chrismorales/webob
cjford/webob
coltonlw/webob
cwebber/webob
cymoo/webob
dairiki/webob
danielerez/webob
danielholmstrom/webob
deuxpi/webob
devIORA/webob
dirkmueller/webob
dobesv/webob
domenkozar/webob
doulbekill/webob
dstufft/webob
e42s/webob
echlebek/webob
faassen/webob
fortara/webob
google-feinberg/webob
gosom/webob
gotostack/webob
greghaynes/webob
hayate/webob
htang2013/webob
ianb/webob
invisibleroads/webob
inytar/webob
jd/webob
jeremydw/webob
jimbaker/webob
jinty/webob
jmwhitfi/webob
joebos/webob
jonatasoliveira/webob
joulez/webob
jturmel/webob
julienmeyer/webob
k-hasan-19/webob
koansys/webob
kthguru/webob
lakshmi-kannan/webob
lasson/webob
lieryan/webob
lmctv/webob
lrowe/webob
ltvolks/webob
lukecyca/webob
madhawa1206/webob
maisano/webob
martinth/webob
mateuszklimek/webob
melon-li/webob
metalman/webob
meteogrid/webob
michilu/webob
minddistrict/webob
miohtama/webob
mitchellrj/webob
mmerickel/webob
moriyoshi/webob
mpirnat/webob
mrmuxl/webob
msabramo/webob
mtawaken/webob
mvidner/webob
narendasan/webob
nickstenning/webob
nirs/webob
nkunal/webob
nphilipp/webob
oas89/webob
openprocurement/webob
panpan-zhang/webob
perey/webob
proppy/webob
pubkraal/webob
py-web/webob
qq40660/webob
quantum-omega/webob
rclmenezes/webob
rjungbeck/webob
rogerioyuuki/webob
ryanpetrello/webob
ryd994/webob
rylz/webob
saschpe/webob
shashankchakelam/webob
sigmavirus24/webob
sileht/webob
simudream/webob
slyang-git/webob
smal/webob
sontek/webob
squirro/webob
stevepiercy/webob
sunyi00/webob
suryakencana007/webob
tailgunnerbeavis/webob
tbkraf08/webob
tc1989tc/webob
techigin/webob
thaisvergani/webob
thefuture2092/webob
toanant/webob
tshepang/webob
wdvill/webob
wenxueliu/webob
whiteroses/webob
witsch/webob
xpahos/webob
xuweiwei2011/webob
yoniLavi/webob
young001/webob
yws/webob
zuiwanting/webob-Pylons
Nothing to show
Choose a head branch
- 2 commits
- 2 files changed
- 0 commit comments
- 1 contributor
Commits on Jul 30, 2015
Raise a better exception for status code failures
Rather than having int() raise a ValueError that doesn't explain what is going on, re-raise with a new description.
Unified
Split
Showing
with
11 additions
and 3 deletions.
- +7 −2 docs/news.txt
- +4 −1 webob/response.py
View
9
docs/news.txt
| @@ -7,10 +7,15 @@ Unreleased | ||
| Backwards Incompatibilities | ||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| - ``response.set_cookie`` renamed the only required parameter from "key" to | ||
| - ``Response.set_cookie`` renamed the only required parameter from "key" to | ||
| "name". The code will now still accept "key" as a keyword argument, and will | ||
| issue a DeprecationWarning until WebOb 1.7. | ||
| - The ``status`` attribute of a ``Response`` object no longer takes a string | ||
| like ``None None`` and allows that to be set as the status. It now has to at | ||
| least match the pattern of ``<integer status code> <explenation of status | ||
| code>``. Invalid status strings will now raise a ``ValueError``. | ||
| 1.5.0a0 (2015-07-25) | ||
| -------------------- | ||
| @@ -38,7 +43,7 @@ Backwards Incompatibilities | ||
| RFC6265 suggests using base 64 to serialize data before storing data in a | ||
| cookie. | ||
| - ``response.set_cookie`` now uses the internal ``make_cookie`` API, which will | ||
| - ``Response.set_cookie`` now uses the internal ``make_cookie`` API, which will | ||
| issue warnings if cookies are set with invalid bytes. See | ||
| https://github.com/Pylons/webob/pull/172 | ||
View
5
webob/response.py
| @@ -262,7 +262,10 @@ def _status__set(self, value): | ||
| % type(value)) | ||
| # Attempt to get the status code itself, if this fails we should fail | ||
| status_code = int(value.split()[0]) | ||
| try: | ||
| status_code = int(value.split()[0]) | ||
| except ValueError: | ||
| raise ValueError('Invalid status code, integer required.') | ||
| self._status = value | ||
| status = property(_status__get, _status__set, doc=_status__get.__doc__) | ||