File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 11import json
2- import subprocess
32from dataclasses import dataclass
43from functools import cache
54from pathlib import Path
@@ -48,7 +47,7 @@ def get_completion(
4847 api_url = '' ,
4948 ).completion
5049
51- try :
50+ if completion :
5251 # Fetch commit from before 30 days ago and checkout
5352 repo = git .Repo (clone_path )
5453 commit = next (repo .iter_commits ('HEAD' , max_count = 1 , before = "30 days ago" ))
@@ -57,11 +56,11 @@ def get_completion(
5756 month_ago_completion = potodo .merge_and_scan_path (
5857 clone_path ,
5958 pot_path = Path (clones_dir , 'cpython/Doc/build/gettext' ),
60- merge_path = Path (tmpdir2 ),
59+ merge_path = Path (tmpdir ),
6160 hide_reserved = False ,
6261 api_url = '' ,
6362 ).completion
64- except Exception :
63+ else :
6564 print (f'{ repo } is empty' )
6665 month_ago_completion = 0.0
6766
You can’t perform that action at this time.
0 commit comments