From 72e386738338e25b709ed78006782bc8f3ca897c Mon Sep 17 00:00:00 2001 From: Worros Date: Thu, 2 Sep 2010 13:42:40 +0800 Subject: [PATCH] THP: Report parse errors properly --- pyfpdb/TestHandsPlayers.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pyfpdb/TestHandsPlayers.py b/pyfpdb/TestHandsPlayers.py index 7be168a7..cbb3f811 100755 --- a/pyfpdb/TestHandsPlayers.py +++ b/pyfpdb/TestHandsPlayers.py @@ -62,7 +62,8 @@ def compare(leaf, importer, errors, site): # test if there is a .hp version of the file importer.addBulkImportImportFileOrDir(filename, site=site) (stored, dups, partial, errs, ttime) = importer.runImport() - if os.path.isfile(filename + '.hp'): + + if os.path.isfile(filename + '.hp') and errs < 1: # Compare them hashfilename = filename + '.hp' @@ -90,6 +91,8 @@ def compare(leaf, importer, errors, site): else: # Stats don't match - Doh! errors.error_report(filename, hand, stat, ghash, testhash, p) + if errs > 0: + errors.error_report(filename, False, "Parse", False, False, False) importer.clearFileList()