YenTheFirst/card_scan — pull request #11 by starstuffharvestingstarlight (2014-02-19 10:20:42+00:00)
Title: Fix for crash when cards.xml is missing a <pt> tag

Found while testing with a recent cards.xml. Some cards were missing the node, set P/T to (0,0) when that's the case.

Example of the error:

looking at Cardboard Carapace
Traceback (most recent call last):
File "website.py", line 50, in
for n in root.findall("./cards/card")))
File "website.py", line 50, in
for n in root.findall("./cards/card")))
File "/home/h/build/mtg-card-scan/search_card.py", line 285, in from_xml_node
p_t = node.find('pt').text.split('/')
AttributeError: 'NoneType' object has no attribute 'text'