summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2017-03-04 18:03:55 +0200
committerLars Wirzenius <liw@liw.fi>2017-03-04 18:03:55 +0200
commitf22175e01ed092acf408aff01af54005ea426268 (patch)
tree13fff931b86d3687a6c7afc49b21177ba8c09e60
parent87c1fea3e7336adc6440f345bda04216abbdec1f (diff)
downloadgit.liw.fi-ruleset-tests-f22175e01ed092acf408aff01af54005ea426268.tar.gz
Add helper to run gitano command with token confirm
-rw-r--r--yarnhelper.py10
1 files changed, 10 insertions, 0 deletions
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):