summaryrefslogtreecommitdiffstats
path: root/ipsilon/info
diff options
context:
space:
mode:
authorJohn Dennis <jdennis@redhat.com>2015-01-27 11:53:31 -0500
committerSimo Sorce <simo@redhat.com>2015-01-27 16:40:46 -0500
commit335ba5558a13ca7214a48a8829e673771f8954df (patch)
tree55407f08417133165dd6461a318481f20ac1d362 /ipsilon/info
parent034fd7a63e5582e18f1436388a2abc2b23567396 (diff)
downloadipsilon-335ba5558a13ca7214a48a8829e673771f8954df.tar.gz
ipsilon-335ba5558a13ca7214a48a8829e673771f8954df.tar.xz
ipsilon-335ba5558a13ca7214a48a8829e673771f8954df.zip
Fix request multipart logging when only 1 part is present
Test to see if the request parameter value is a cherrypy Part class. This was already being done for the case where the value was a list, but it was omitted for single values. Logic was combined into new local function print_param(). Changed the test for the class back to using if isinstance(item, cherrypy._cpreqbody.Part): instead of: if getattr(item, "part_class", None): because using isinstance() clearly indicates what is being done. The use of getattr() was introduced to prevent a pylint warning concering use of protected values. The getattr() hack is confusing and proably not robust if the class implementation changes. The patch now disables this warning. I cannot explain why cherrypy marks these modules as protected when clearly one has to utilize them and they are documented in the cherrypy API doc. Disabling the warning seems the cleanest and most robust approach. Signed-off-by: John Dennis <jdennis@redhat.com> Reviewed-by: Simo Sorce <simo@redhat.com>
Diffstat (limited to 'ipsilon/info')
0 files changed, 0 insertions, 0 deletions