From 225872d5f0d89df1fdabbae59528ee3d60ece862 Mon Sep 17 00:00:00 2001 From: Shinji Suzuki Date: Sun, 20 May 2018 00:53:14 +0900 Subject: [PATCH] Fix unintended reference to a variable (which is unlikely to be evaluated though). --- scripts/osdriver.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/osdriver.py b/scripts/osdriver.py index a19de75..98ab4fb 100644 --- a/scripts/osdriver.py +++ b/scripts/osdriver.py @@ -317,7 +317,9 @@ class Linux(Base): encoding = lang.rsplit('.')[-1] if lang else 'utf-8' raise RuntimeError(str(_err_out, encoding)) except subprocess.CalledProcessError as e: - raise RuntimeError(str(e) + '\n\n' + stderr) + # Control is unlikely to reach here because Popen() is not + # supposed to raise this exception. + raise RuntimeError(str(e)) subprocess.check_call(['partprobe', disk_dev]) if b'msdos' in _cmd_out: return False