File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ def _load_last_known_counts(self):
3232 except FileNotFoundError :
3333 # File doesn't exist yet, will be created on first save
3434 pass
35- except Exception as e :
35+ except ( json . JSONDecodeError , IOError ) as e :
3636 print (f"Warning: Could not load last known counts: { e } " )
3737 return {'counts' : {}, 'dates' : {}}
3838
@@ -41,7 +41,7 @@ def _save_last_known_counts(self):
4141 try :
4242 with open (self .LAST_KNOWN_FILE , 'w' ) as f :
4343 json .dump (self .last_known_counts , f , indent = 2 )
44- except Exception as e :
44+ except ( IOError , OSError ) as e :
4545 print (f"Warning: Could not save last known counts: { e } " )
4646
4747 def _update_last_known (self , platform , count ):
@@ -209,7 +209,6 @@ def get_codechef(self):
209209 count = int (match .group (1 ))
210210 # Sanity check - CodeChef count should be reasonable
211211 if 0 < count < MAX_REASONABLE_COUNT :
212- print (f" Found using pattern: { pattern [:50 ]} ..." )
213212 return count
214213
215214 # If no pattern matched, save HTML for debugging (in verbose mode)
You can’t perform that action at this time.
0 commit comments