Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

Commit

Permalink
fixup! syscontainers: add generation of an rpm
Browse files Browse the repository at this point in the history
  • Loading branch information
giuseppe committed Dec 9, 2016
1 parent b868a7f commit 252b698
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Atomic/syscontainers.py
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,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

Expand Down Expand Up @@ -1510,6 +1511,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())
Expand Down

0 comments on commit 252b698

Please sign in to comment.