From a2b0852f49fae7fe1bb5f327c5dd9356d9211d50 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Fri, 24 Apr 2020 01:37:51 +0200 Subject: [PATCH] Minor adjustment --- jail.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/jail.py b/jail.py index 0872704..2dc1691 100644 --- a/jail.py +++ b/jail.py @@ -22,7 +22,10 @@ def jail_run(path, command): try: res = subprocess.run(command) finally: - subprocess.run(['jail', '-r', get_jid(path)]) + try: + subprocess.run(['jail', '-r', get_jid(path)]) + except ValueError: + pass subprocess.run(['umount', '-f', os.path.join(path, 'dev')]) if res.returncode != 0: # subprocess.run(['umount', os.path.join(path, 'dev')])