From 584968d9347935c04cc7ddcece7386a64af4ea1f Mon Sep 17 00:00:00 2001 From: Vivek Anand Date: Sep 09 2016 08:01:59 +0000 Subject: Verify before executing push that the user has installed the pagure tickets plugin --- diff --git a/pagure_importer/commands/push.py b/pagure_importer/commands/push.py index 97b9705..e07fcf4 100644 --- a/pagure_importer/commands/push.py +++ b/pagure_importer/commands/push.py @@ -1,5 +1,6 @@ import click import os +import sys import subprocess as sp from pagure_importer.app import app, REPO_PATH @@ -7,6 +8,11 @@ from pagure_importer.app import app, REPO_PATH @app.command() @click.argument('repo_name') def push (repo_name): + not_cont = raw_input('Before executing this command, you must have' + ' "Pagure Tickets" enabled from pagure project\'s settings' + ' (Pressing just "Enter" will continue): ') + if not_cont: + sys.exit(1) repo = os.path.join(REPO_PATH, repo_name) os.chdir(repo) cmd = ['git', 'push', 'origin', 'master' ]