On Samstag, 18. Oktober 2008, Philip Jenvey wrote: > On Oct 17, 2008, at 2:01 PM, Christoph Haas wrote: > > I tried to use: > > > > import warnings > > warnings.filterwarnings('ignore', 'JSON responses with Array > > envelopes') > > > > in several places like lib/base.py or config/environment.py but the > > warning > > always still appeared. Where would I put that code to be successful? I > > know it's close to trivial to just copy the @jsonify decorator > > function > > and removing that line. I'm more interested in how to suppress the > > warnings. > > I'd recommend environment.py for the most appropriate place for this. > > It's not working because the message argument should be an RE match, > > whereas you're assuming it's an RE search. Try: > > warnings.filterwarnings('ignore', '.*JSON responses with Array > > envelopes.*')
Thanks for the hint. Unfortunately the warnings still appears at every request. Christoph -- A guess is just a guess until you turn it into a pie chart. Then it's an analysis. (Scott Adams)
signature.asc
Description: This is a digitally signed message part.