File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -384,16 +384,15 @@ def save(self) -> None:
384384
385385 f .write ("\n " )
386386
387- # Write provider sections
387+ # Write all provider sections (empty if not configured)
388388 known_providers = ['github' , 'gitlab' , 'gitea' , 'sourcehut' ]
389389 for provider_section in known_providers :
390- if self .config .has_section (provider_section ):
391- f .write (f"[{ provider_section } ]\n " )
392- for key in ['username' , 'url' , 'token' ]:
393- value = self .config .get (provider_section , key ,
394- fallback = '' )
395- f .write (f"{ key } = { value } \n " )
396- f .write ("\n " )
390+ f .write (f"[{ provider_section } ]\n " )
391+ for key in ['username' , 'url' , 'token' ]:
392+ value = self .config .get (provider_section , key ,
393+ fallback = '' ) if self .config .has_section (provider_section ) else ''
394+ f .write (f"{ key } = { value } \n " )
395+ f .write ("\n " )
397396
398397 if 'COLORS' in self .config ._sections :
399398 f .write ("[COLORS]\n " )
You can’t perform that action at this time.
0 commit comments