diff options
-rwxr-xr-x | contrib/jail_prober.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/contrib/jail_prober.py b/contrib/jail_prober.py index 6f8e98b6a..dad790b57 100755 --- a/contrib/jail_prober.py +++ b/contrib/jail_prober.py | |||
@@ -111,14 +111,22 @@ def run_firejail(program, allArgs): | |||
111 | """ | 111 | """ |
112 | goodArgs = ['firejail', '--noprofile', program] | 112 | goodArgs = ['firejail', '--noprofile', program] |
113 | badArgs = [] | 113 | badArgs = [] |
114 | allArgs.insert(0,"") | ||
114 | print('Attempting to run %s in Firejail' % program) | 115 | print('Attempting to run %s in Firejail' % program) |
115 | for arg in allArgs: | 116 | for arg in allArgs: |
116 | print('Running with', arg) | 117 | if arg: |
117 | subprocess.call(goodArgs) | 118 | print('Running with', arg) |
119 | else: | ||
120 | print('Running without profile') | ||
121 | #We are adding the argument in a copy of the actual list to avoid modify it now. | ||
122 | myargs=goodArgs.copy() | ||
123 | if arg: | ||
124 | myargs.insert(-1,arg) | ||
125 | subprocess.call(myargs) | ||
118 | ans = input('Did %s run correctly? [y]/n ' % program) | 126 | ans = input('Did %s run correctly? [y]/n ' % program) |
119 | if ans in ['n', 'N']: | 127 | if ans in ['n', 'N']: |
120 | badArgs.append(arg) | 128 | badArgs.append(arg) |
121 | else: | 129 | elif arg: |
122 | goodArgs.insert(-1, arg) | 130 | goodArgs.insert(-1, arg) |
123 | print('\n') | 131 | print('\n') |
124 | # Don't include 'firejail', '--noprofile', or program name in arguments | 132 | # Don't include 'firejail', '--noprofile', or program name in arguments |