From af4b52c6a23d5c2be54dbcebb4e6bd58915aa05d Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 24 Apr 2017 17:09:56 +0300 Subject: Move gitano() out from YarnHelper --- yarnhelper.py | 27 --------------------------- 1 file changed, 27 deletions(-) (limited to 'yarnhelper.py') diff --git a/yarnhelper.py b/yarnhelper.py index 4cd729a..fa67a3c 100644 --- a/yarnhelper.py +++ b/yarnhelper.py @@ -185,33 +185,6 @@ class YarnHelper(object): else: return self.ssh_key_file_for_user(user) - def gitano(self, user, args, stdin=None): # pragma: no cover - server = os.environ['GITANO_SERVER'] - kwargs = { - 'stderr': subprocess.STDOUT, - 'ssh_options': [ - '-oPasswordAuthentication=no', - '-oIdentitiesOnly=yes', - '-i', self.get_user_ssh_key(user), - ], - } - if stdin is not None: - kwargs['feed_stdin'] = stdin - return cliapp.ssh_runcmd( - 'git@{}'.format(server), - args.split(), - **kwargs) - - def gitano_confirm_with_token(self, prefix, which): # pragma: no cover - try: - output = self.gitano(None, '{} {}'.format(prefix, which)) - except cliapp.AppException: - pass - else: - last_line = output.splitlines()[-1] - token = last_line.split()[-1] - self.gitano(None, '{} {} {}'.format(prefix, which, token)) - class Error(Exception): -- cgit v1.2.1