Skip to content
Snippets Groups Projects
Commit 76e06ea4 authored by Damian Alvarez's avatar Damian Alvarez
Browse files

Otherwise the variable is declared locally in the funcitons and the script fails

parent 4fbe2ca7
Branches
Tags
No related merge requests found
......@@ -35,6 +35,7 @@ executed_cmds = 0
def confirm(cmd):
"""Asks for confirmation before running a command"""
global executed_cmds
yes = ['yes', 'y']
no = ['no', 'n']
cancel = ['cancel', 'c']
......@@ -62,6 +63,7 @@ def confirm(cmd):
def run_cmd(cmd, dry_run, force):
"""Decide if the commands need to be actually run or just printed"""
global executed_cmds
cmd_str = ' '.join(cmd)
if dry_run:
LOGGER.debug('Dry-run: ' + cmd_str)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment