File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed
Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 66
77
88def login (token ):
9- if 1 :
9+ try :
1010 client = RepositoryFactory .create_api ("github" , token )
11- # except Exception as err:
12- # print(f'Github: Connect: error {err}')
13- # print('Github: Connect: user could not be authenticated please try again.')
14- # exit(1)
15- # else:
11+ except Exception as err :
12+ print (f'Github: Connect: error { err } ' )
13+ print ('Github: Connect: user could not be authenticated please try again.' )
14+ exit (1 )
15+ else :
1616 return client
1717
1818
@@ -50,16 +50,16 @@ def get_next_repo(clients: IClients, repositories):
5050 list_repos = [x for x in file .read ().split ('\n ' ) if x ]
5151 print (list_repos )
5252 for repo_name in list_repos :
53- if 1 :
53+ try :
5454 cur_client = clients .get_next_client ()
5555 repo = cur_client ['client' ].get_repository (repo_name )
5656 if not repo :
5757 raise Exception (f"Repository { repo_name } not found." )
58- # except Exception as err:
59- # print(f'Github: Connect: error {err}')
60- # print(f'Github: Connect: failed to load repository "{repo_name}"')
61- # exit(1)
62- # else:
58+ except Exception as err :
59+ print (f'Github: Connect: error { err } ' )
60+ print (f'Github: Connect: failed to load repository "{ repo_name } "' )
61+ exit (1 )
62+ else :
6363 yield repo
6464
6565
You can’t perform that action at this time.
0 commit comments