From 8a0654abe2db919b04683d40100b469e8c3adc4b Mon Sep 17 00:00:00 2001 From: Tommi Virtanen Date: Mon, 3 Sep 2007 17:04:41 -0700 Subject: Refactor command line utilities to share setup. Hide internal gitosis-ssh and gitosis-gitweb, it's all in gitosis-run-hook. --- gitosis/ssh.py | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'gitosis/ssh.py') diff --git a/gitosis/ssh.py b/gitosis/ssh.py index 21f351a..7a70ed4 100644 --- a/gitosis/ssh.py +++ b/gitosis/ssh.py @@ -77,28 +77,3 @@ def writeAuthorizedKeys(path, keydir): if in_ is not None: in_.close() os.rename(tmp, path) - -def _getParser(): - import optparse - parser = optparse.OptionParser( - usage="%prog [--authkeys=FILE] KEYDIR") - parser.set_defaults( - authkeys=os.path.expanduser('~/.ssh/authorized_keys'), - ) - parser.add_option( - "--authkeys", - help="path to SSH authorized keys file") - return parser - -def main(): - parser = _getParser() - (options, args) = parser.parse_args() - - if len(args) != 1: - parser.error('Need one argument on the command line.') - - keydir, = args - - writeAuthorizedKeys( - path=options.authkeys, - keydir=keydir) -- cgit v1.2.3