Skip to content

Commit a4b54e8

Browse files
Fixed the bug of Git management...
1 parent 1eab50f commit a4b54e8

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

git_management/git_init.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
# g = Github("user", "password")
3232
# os.system('.\ssh_agent_init.sh')
3333
# or using an access token
34-
githubAccessToken=''
35-
githubActorName=''
36-
githubActorEMail=''
3734
# First create a Github instance:
3835
g = Github(githubAccessToken)
3936
actor = Actor(githubActorName, githubActorEMail)
@@ -45,10 +42,12 @@
4542

4643
def listGitHubRepo():
4744
# Then play with your Github objects:
48-
print(BLUE+"List of repo on GitHub :")
49-
for repo in g.get_user().get_repos():
50-
print(BLUE+repo.name)
51-
45+
print(BLUE+"List of repo on GitHub :"+str(g.get_user()))
46+
try:
47+
for repo in g.get_user().get_repos():
48+
print(BLUE+repo.name)
49+
except Exception as e:
50+
print(e)
5251

5352
def isGitHubRepoExisting(name):
5453
# Then play with your Github objects:
@@ -165,4 +164,5 @@ def gitCreateAndPush(repository,repoDescription):
165164
sh_command.runGitPushInCommandLine(repository)
166165

167166

168-
# print('test')
167+
# print('test')
168+
# listGitHubRepo()

0 commit comments

Comments
 (0)