@@ -220,11 +220,11 @@ def handle_add_command(args: argparse.Namespace) -> None:
220220 repo_path = expand_dir (pathlib .Path (repo_input ), cwd = cwd )
221221
222222 if not repo_path .exists ():
223- log .error ("Repository path %s does not exist." , repo_path )
223+ log .error ("Repository path %s does not exist." , PrivatePath ( repo_path ) )
224224 return
225225
226226 if not repo_path .is_dir ():
227- log .error ("Repository path %s is not a directory." , repo_path )
227+ log .error ("Repository path %s is not a directory." , PrivatePath ( repo_path ) )
228228 return
229229
230230 override_name = getattr (args , "override_name" , None )
@@ -319,7 +319,11 @@ def handle_add_command(args: argparse.Namespace) -> None:
319319 response = ""
320320 proceed = response .strip ().lower () in {"y" , "yes" }
321321 if not proceed :
322- log .info ("Aborted import of '%s' from %s" , repo_name , repo_path )
322+ log .info (
323+ "Aborted import of '%s' from %s" ,
324+ repo_name ,
325+ PrivatePath (repo_path ),
326+ )
323327 return
324328
325329 add_repo (
@@ -400,7 +404,10 @@ def add_repo(
400404 )
401405 return
402406 except Exception :
403- log .exception ("Error loading YAML from %s. Aborting." , config_file_path )
407+ log .exception (
408+ "Error loading YAML from %s. Aborting." ,
409+ PrivatePath (config_file_path ),
410+ )
404411 if log .isEnabledFor (logging .DEBUG ):
405412 traceback .print_exc ()
406413 return
@@ -579,7 +586,10 @@ def _prepare_no_merge_items(
579586 Style .RESET_ALL ,
580587 )
581588 except Exception :
582- log .exception ("Error saving config to %s" , config_file_path )
589+ log .exception (
590+ "Error saving config to %s" ,
591+ PrivatePath (config_file_path ),
592+ )
583593 if log .isEnabledFor (logging .DEBUG ):
584594 traceback .print_exc ()
585595 elif (duplicate_merge_changes > 0 or config_was_relabelled ) and dry_run :
@@ -635,7 +645,10 @@ def _prepare_no_merge_items(
635645 Style .RESET_ALL ,
636646 )
637647 except Exception :
638- log .exception ("Error saving config to %s" , config_file_path )
648+ log .exception (
649+ "Error saving config to %s" ,
650+ PrivatePath (config_file_path ),
651+ )
639652 if log .isEnabledFor (logging .DEBUG ):
640653 traceback .print_exc ()
641654 return
@@ -719,7 +732,10 @@ def _prepare_no_merge_items(
719732 Style .RESET_ALL ,
720733 )
721734 except Exception :
722- log .exception ("Error saving config to %s" , config_file_path )
735+ log .exception (
736+ "Error saving config to %s" ,
737+ PrivatePath (config_file_path ),
738+ )
723739 if log .isEnabledFor (logging .DEBUG ):
724740 traceback .print_exc ()
725741 return
@@ -778,6 +794,9 @@ def _prepare_no_merge_items(
778794 Style .RESET_ALL ,
779795 )
780796 except Exception :
781- log .exception ("Error saving config to %s" , config_file_path )
797+ log .exception (
798+ "Error saving config to %s" ,
799+ PrivatePath (config_file_path ),
800+ )
782801 if log .isEnabledFor (logging .DEBUG ):
783802 traceback .print_exc ()
0 commit comments