Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Unassigned variables cause UnboundLocalError in Kotoba

#6

Affected Version: Yotsuba 3.0 / Kotoba 2.0

Description:

File "/Users/jnopporn/Code/www-v11/yotsuba/lib/kotoba.py", line 253, in data max_depth = 'max_depth' in kwargs and (base.isNaturalNumber(max_depth) and max_depth - 1 or None) or None UnboundLocalError: local variable 'max_depth' referenced before assignment

Reproductive Steps: Attempt to call DOMElement.data()

Solution (Proposal): From

    max_depth = 'max_depth' in kwargs and (base.isNaturalNumber(max_depth) and max_depth - 1 or None) or None

to

    max_depth = None
    if 'max_depth' in kwargs and base.isNaturalNumber(max_depth):
        max_depth = max_depth - 1

Reported by juti_n (at yahoo) · February 12th, 2011 @ 09:13 PM

State: resolved
Milestone: Yotsuba 3.1
Assigned to: juti_n (at yahoo) juti_n (at yahoo)

Activity

  1. juti_n (at yahoo)
    juti_n (at yahoo)
    • State changed from new to resolved

    Removed max_depth as it was unnecessary.

    February 13th, 2011 @ 01:28 AM

  2. juti_n (at yahoo)
    juti_n (at yahoo)
    • Milestone changed from Yotsuba 4 to Yotsuba 3.1
    • Milestone order changed from 4 to 0

    February 13th, 2011 @ 01:29 AM

  3. juti_n (at yahoo)
    juti_n (at yahoo)
    • Tag set to yotsuba 3, defect

    February 14th, 2011 @ 09:18 PM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.