Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #602 (closed defect: fixed)

Opened 12 years ago

Last modified 10 years ago

[PATCH][TEST] Allowing JSON from the config file doesn't work

Reported by: anonymous Owned by: anonymous
Priority: high Milestone: 0.9a1
Component: TurboGears Version:
Severity: normal Keywords:
Cc: simon.belak@…

Description

There's a bug in the JSON handling code which keeps the user from enabling JSON output in the config file. This means the 'tg.allow_json=True' setting currently doesn't have any effect.

Attachments

json_config.diff Download (2.9 KB) - added by plewis 12 years ago.
ok, that's better

Change History

comment:1 Changed 12 years ago by kevin

  • Cc simon.belak@… added

The problem here is that the logic for checking the allow_json flag is incorrect. If the config file option is there, but allow_json is not set in expose, you effectively get:

if (False) or not (False):
    raise exception

There should be a test for this case.

comment:2 Changed 12 years ago by plewis

argh, that's not quite right. A better patch in a bit.

Changed 12 years ago by plewis

ok, that's better

comment:3 Changed 12 years ago by plewis

  • Summary changed from Allowing JSON from the config file doesn't work to [PATCH][TEST] Allowing JSON from the config file doesn't work

comment:4 Changed 12 years ago by simon

  • Status changed from new to closed
  • Resolution set to fixed

Commited in r803. Thanks!

Note: See TracTickets for help on using tickets.