aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2016-06-08 08:56:34 -0700
committerJonas Bjurel <jonas.bjurel@ericsson.com>2016-09-29 12:07:33 +0000
commite4ee518727720813a99574deb58c5bff6b97d5f3 (patch)
tree72b56b87745bc20e0b5824c8ce8cf2345ea9e946
parentc25f5af252949dc1b249f77fe8e33c5ea13c1ad1 (diff)
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 <ross.b.brattain@intel.com>
-rw-r--r--deploy/common.py2
1 files changed, 1 insertions, 1 deletions
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)