diff --git a/lib/git_checks.py b/lib/git_checks.py
index 7dca8a2..1be7802 100644
--- a/lib/git_checks.py
+++ b/lib/git_checks.py
@@ -21,22 +21,23 @@ def kubuntuCheckValidBranch(distribution=None):
git_repo = Repo('.')
branch_name = str(git_repo.active_branch)
branch_name_parts = branch_name.split('_')
+ warning = ''
try:
kubuntu = branch_name_parts[0]
branch_dist = branch_name_parts[1]
target = branch_name_parts[2]
if kubuntu != "kubuntu":
- print("Current branch '%s' is not a Kubuntu branch" % branch_name)
- sys.exit(1)
+ warning = "Current branch '%s' is not a Kubuntu branch" % branch_name
if target not in ["archive","backports"]:
- print("Current branch '%s' is not an archive or backports Kubuntu branch" % branch_name)
- sys.exit(1)
+ warning += '\n'+ "Current branch '%s' is not an archive or backports Kubuntu branch" % branch_name
if (distribution != None) and (distribution != branch_dist):
- print("Current branch '%s' is not a valid branch for distribution '%s'" % (branch_name,distribution))
- sys.exit(1)
+ warning = '\n'+ "Current branch '%s' is not a valid branch for distribution '%s'" % (branch_name,distribution)
except Exception:
if branch_name != "master":
- print("Couldn't find out distribution name for branch '%s'" % branch_name)
+ warning = "Couldn't find out distribution name for branch '%s'" % branch_name
+ if warning != '':
+ ui = input(warning + '\nContinue anyway y/N :') + ' '
+ if ui.lower()[0] != 'y':
sys.exit(1)
#Check if the current branch has changes not pushed to git