From 263ceed1326af819ac7122519908e367d6ec87f3 Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Thu, 1 Dec 2016 14:31:54 +0100 Subject: [PATCH] fixup! syscontainers: add generation of an rpm --- Atomic/syscontainers.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Atomic/syscontainers.py b/Atomic/syscontainers.py index 175126e5..6eb15f72 100644 --- a/Atomic/syscontainers.py +++ b/Atomic/syscontainers.py @@ -960,7 +960,8 @@ def get_system_images(self, get_all=False, repo=None): def _is_service_active(self, name): try: - return self._systemctl_command("is-active", name, quiet=True).replace("\n", "") == "active" + ret = self._systemctl_command("is-active", name, quiet=True) + return ret and ret.replace("\n", "") == "active" except subprocess.CalledProcessError: return False @@ -1504,6 +1505,9 @@ def generate_rpm(self, repo, name, image): spec_file = os.path.join(temp_dir, "container.spec") self._checkout(repo, name, image, 0, False, destination=rootfs, prefix=rpm_content) + if self.display: + return + installed_files = None with open(os.path.join(rootfs, "info"), "r") as info_file: info = json.loads(info_file.read())