From ce9b0bf5568b4f9c6794e7c5fa4c9c4f26daccf6 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 27 Oct 2021 14:21:30 -0400 Subject: [PATCH] Support terminating include with > The previous thought of , that looks better. --- confluent_server/confluent/syncfiles.py | 3 +++ imgutil/imgutil | 3 +++ 2 files changed, 6 insertions(+) diff --git a/confluent_server/confluent/syncfiles.py b/confluent_server/confluent/syncfiles.py index f7148815..6477462f 100644 --- a/confluent_server/confluent/syncfiles.py +++ b/confluent_server/confluent/syncfiles.py @@ -33,6 +33,9 @@ def mkdirp(path): raise def get_entries(filename): + filename = filename.strip() + if filename[-1] == '>': + filename = filename[:-1] with open(filename, 'r') as slfile: slist = slfile.read() entries = slist.split('\n') diff --git a/imgutil/imgutil b/imgutil/imgutil index fcb8d6fc..b59d08f9 100644 --- a/imgutil/imgutil +++ b/imgutil/imgutil @@ -412,6 +412,9 @@ class OsHandler(object): def list_packages(self, pkglistfile=None): if pkglistfile is None: pkglistfile = self.pkglist + pkglistfile = pkglistfile.strip() + if pkglistfile[-1] == '>': + pkglistfile = pkglistfile[:-1] with open(pkglistfile, 'r') as pkglist: pkgs = pkglist.read() pkgs = pkgs.split()