mirror of
https://github.com/Cockatrice/Magic-Spoiler.git
synced 2026-03-21 17:54:59 -05:00
Add more info to parsing error message (#317)
Some checks failed
Deploy / Check for new spoiler (push) Has been cancelled
Some checks failed
Deploy / Check for new spoiler (push) Has been cancelled
* Add exception to message * Add set code * Print warning in CI summary * Improve error messages for card parsing
This commit is contained in:
parent
4cef743e46
commit
f8cdbc9a7f
|
|
@ -250,8 +250,13 @@ def scryfall2mtgjson(scryfall_cards: List[Dict[str, Any]]) -> List[Dict[str, Any
|
|||
"subTypes": sub_types,
|
||||
}
|
||||
trice_cards.append(trice_card)
|
||||
except Exception:
|
||||
print(f"Unable to parse {sf_card.get('name')}")
|
||||
|
||||
except Exception as e:
|
||||
# If running in GitHub Actions CI, print the message as a warning
|
||||
if 'GITHUB_ACTION' in os.environ:
|
||||
print(f'::warning::Unable to parse "{sf_card.get("name")}" ({sf_card.get("set").upper()}): {str(e)}')
|
||||
else:
|
||||
print(f'Unable to parse "{sf_card.get("name")}" ({sf_card.get("set").upper()}): {str(e)}')
|
||||
|
||||
return trice_cards
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user