Преглед на файлове

Change assert into debug

Foppe Hemminga преди 6 години
родител
ревизия
6c66c41583
променени са 1 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 6 3
      _bs.py

+ 6 - 3
_bs.py

@@ -177,7 +177,10 @@ def process_scratchings(this_data, this_venue):
     late_scratchings = scrape_scratchings(div, this_venue)
     scratchings.update(late_scratchings)
 
-    assert len(scratchings) == int(scratchings_count), 'len(scratchings) {} == scratchings_count {}'.format(
-         len(scratchings), scratchings_count)
-    # pprint(scratchings)
+    # assert len(scratchings) == int(scratchings_count), 'len(scratchings) {} == scratchings_count {}'.format(
+    #     len(scratchings), scratchings_count)
+    if len(scratchings) != int(scratchings_count):
+        print('len(scratchings) {} == scratchings_count {}'.format(
+            len(scratchings), scratchings_count))
+        pprint(scratchings)
     return scratchings