From e91feac31c51a038d56576882bb01b43f5d82983 Mon Sep 17 00:00:00 2001 From: Petro Karashchenko Date: Tue, 4 Apr 2017 01:00:39 +0300 Subject: [PATCH] Prevent ONL installation failure on systems not support UBI storages --- .../vendor-config-onl/src/python/onl/install/InstallUtils.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py index c7d3ee14..1cc40e4c 100644 --- a/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py +++ b/packages/base/all/vendor-config-onl/src/python/onl/install/InstallUtils.py @@ -106,7 +106,10 @@ class SubprocessMixin: sys.stderr.write(fd.read()) os.unlink(v2Out) else: - return subprocess.check_output(cmd, *args, cwd=cwd, **kwargs) + try: + return subprocess.check_output(cmd, *args, cwd=cwd, **kwargs) + except subprocess.CalledProcessError: + return '' def rmdir(self, path): self.log.debug("+ /bin/rmdir %s", path)