From f22175e01ed092acf408aff01af54005ea426268 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 4 Mar 2017 18:03:55 +0200 Subject: Add helper to run gitano command with token confirm --- yarnhelper.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/yarnhelper.py b/yarnhelper.py index 6272102..67b0a88 100644 --- a/yarnhelper.py +++ b/yarnhelper.py @@ -144,6 +144,16 @@ class YarnHelper(object): args.split(), stderr=subprocess.STDOUT) + def gitano_confirm_with_token(self, prefix, which): # pragma: no cover + try: + output = self.gitano('{} {}'.format(prefix, which)) + except cliapp.AppException: + pass + else: + last_line = output.splitlines()[-1] + token = last_line.split()[-1] + self.gitano('{} {}'.format(prefix, token)) + class Error(Exception): -- cgit v1.2.1