From e4ee518727720813a99574deb58c5bff6b97d5f3 Mon Sep 17 00:00:00 2001 From: Ross Brattain Date: Wed, 8 Jun 2016 08:56:34 -0700 Subject: check read access instead of isfile() for Fuel ISO When testing with nested virtualzation I attached the Fuel ISO to VM (/dev/sr0) running deploy.sh This failed because we expect the ISO to be a file, when it could be a device, e.g. /dev/sr0. Instead of checking isfile() check for read access. This tested with bsdtar. It can extract an ISO from a file or device. Change-Id: Ic09373cd618b33382303d9134cce4e005040de95 Signed-off-by: Ross Brattain --- deploy/common.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'deploy') diff --git a/deploy/common.py b/deploy/common.py index 07ad54372..51b70fe46 100644 --- a/deploy/common.py +++ b/deploy/common.py @@ -140,7 +140,7 @@ def warn(message): def check_file_exists(file_path): if not os.path.dirname(file_path): file_path = '%s/%s' % (CWD, file_path) - if not os.path.isfile(file_path): + if not os.access(file_path, os.R_OK): err('ERROR: File %s not found\n' % file_path) -- cgit 1.2.3-korg