@@ -22,16 +22,18 @@ def parse_commandline():
2222 parser = OptionParser ()
2323 parser .description = __doc__
2424
25- parser .set_usage ('usage: %prog [options] (list|add|remove) [collaborator]. Try %prog --help for details.' )
25+ parser .set_usage ('usage: %prog [options] (list|add|remove) [collaborator].'
26+ 'Try %prog --help for details.' )
2627 parser .add_option ('-d' , '--debug' , action = 'store_true' ,
2728 help = 'Enables debugging mode' )
2829 parser .add_option ('-l' , '--login' ,
2930 help = 'Username to login with' )
3031 parser .add_option ('-a' , '--account' ,
31- help = 'User owning the repositories to be changed [default: same as --login]' )
32+ help = 'User owning the repositories to be changed ' \
33+ '[default: same as --login]' )
3234 parser .add_option ('-t' , '--apitoken' ,
33- help = 'API Token - can be found on the lower right of https://github.com/account' )
34-
35+ help = 'API Token - can be found on the lower right of ' \
36+ 'https://github.com/account' )
3537
3638 options , args = parser .parse_args ()
3739 if len (args ) not in [1 , 2 ]:
@@ -50,19 +52,19 @@ def parse_commandline():
5052
5153def main (options , args ):
5254 """This implements the actual program functionality"""
53-
55+
5456 if not options .account :
5557 options .account = options .login
56-
58+
5759 github = github2 .client .Github (username = options .login ,
5860 api_token = options .apitoken ,
5961 debug = options .debug )
60-
62+
6163 if len (args ) == 1 :
6264 for repos in github .repos .list (options .account ):
6365 fullreposname = github .project_for_user_repo (options .account , repos .name )
6466 print "%s: %s" % (repos .name , ' ' .join (github .repos .list_collaborators (fullreposname )))
65- time .sleep (0.5 ) # to keep github from overloading
67+ time .sleep (0.5 ) # to keep github from overloading
6668 elif len (args ) == 2 :
6769 command , collaborator = args
6870 for repos in github .repos .list (options .account ):
@@ -75,7 +77,7 @@ def main(options, args):
7577 if command == 'add' :
7678 github .repos .add_collaborator (repos .name , collaborator )
7779 print "added %r to %r" % (collaborator , repos .name )
78- time .sleep (0.5 ) # to keep github from overloading
80+ time .sleep (0.5 ) # to keep github from overloading
7981
8082
8183if __name__ == '__main__' :
0 commit comments