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 committed Aug 30, 2019
1 parent 1ad6d1b commit f9834ac
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions omps/quay.py
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 f9834ac

Please sign in to comment.