Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Commit

Permalink
Only log this statement when replacement will really happen.
Browse files Browse the repository at this point in the history
Otherwise, our logs are full of lines indicating that something is being
replaced, with little indication of what is really happening.
  • Loading branch information
ralphbean authored and MartinBasti committed Sep 2, 2019
1 parent 1ad6d1b commit ec48e18
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions omps/quay.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ def replace_registries(self, text):
for conf in self._replace_registry_conf:
old = conf['old']
new = conf['new']
self.logger.info("Replacing registry '%s' with '%s'", old, new)
text = text.replace(old, new)
if old in text:
self.logger.info("Replacing registry '%s' with '%s'", old, new)
text = text.replace(old, new)

return text

Expand Down

0 comments on commit ec48e18

Please sign in to comment.