Skip to content

Commit 42659cc

Browse files
committed
empanadas: Eliminate user agent template hack
Jinja's official method for including template-like strings within templates is to use variable blocks with quoted strings inside. We will eliminate the need for callers to provide something which the mock template can provide on its own.
1 parent a604c7e commit 42659cc

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

iso/empanadas/empanadas/templates/isomock.tmpl.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ best=1
3535
install_weak_deps=0
3636
protected_packages=
3737
module_platform_id=platform:{{ dist }}
38-
user_agent={{ user_agent }}
38+
user_agent={{ '{{' }} user_agent {{ '}}' }}
3939
4040
{% for repo in repos %}
4141
[{{ repo.name }}]

iso/empanadas/empanadas/util/iso_utils.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ def generate_iso_scripts(self):
229229
required_pkgs=required_pkgs,
230230
dist=self.disttag,
231231
repos=self.repolist,
232-
user_agent='{{ user_agent }}',
233232
compose_dir_is_here=self.compose_dir_is_here,
234233
compose_dir=self.compose_root,
235234
)
@@ -802,7 +801,6 @@ def _extra_iso_local_config(self, arch, image, grafts, work_root):
802801
required_pkgs=required_pkgs,
803802
dist=self.disttag,
804803
repos=self.repolist,
805-
user_agent='{{ user_agent }}',
806804
compose_dir_is_here=True,
807805
compose_dir=self.compose_root,
808806
)
@@ -1691,7 +1689,6 @@ def _live_iso_local_config(self, image, work_root):
16911689
dist=self.disttag,
16921690
repos=self.repolist,
16931691
compose_dir_is_here=True,
1694-
user_agent='{{ user_agent }}',
16951692
compose_dir=self.compose_root,
16961693
)
16971694

0 commit comments

Comments
 (0)