cubicweb/__main__.py
author Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
Thu, 03 May 2018 16:47:51 +0200
branch3.26
changeset 12320 d46753a9a2a5
parent 12253 9165f4b7426b
permissions -rwxr-xr-x
[python3] make sure staticcontroller returns a bytes instance The ``publish()`` method of controller is supposed to return a bytes intsance. Returning a text_type instance will crash later on in the Pyramid response handler when assigning content to ``response.body`` (at least in Python3):: >>> from pyramid.response import Response >>> r = Response() >>> r.body = '' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/home/adim/.virtualenvs/…/response.py", line 562, in _body__set raise TypeError(msg) TypeError: You cannot set Response.body to a text object (use Response.text)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
11099
5fdbf6f2db88 Add a __main__ to cubicweb
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     1
from cubicweb.cwctl import run
5fdbf6f2db88 Add a __main__ to cubicweb
Denis Laxalde <denis.laxalde@logilab.fr>
parents:
diff changeset
     2
12253
9165f4b7426b Set a default value for arguments of cubicweb.cwctl:run()
Denis Laxalde <denis.laxalde@logilab.fr>
parents: 11099
diff changeset
     3
run()