diff options
Diffstat (limited to 'pipeline_backup.py')
-rwxr-xr-x | pipeline_backup.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pipeline_backup.py b/pipeline_backup.py index e1f5e2e..5399e99 100755 --- a/pipeline_backup.py +++ b/pipeline_backup.py @@ -22,8 +22,11 @@ class PipelineSpec: def replace(self, old, new): for idx, record in enumerate(self.data): - if old in record: - self.data[idx] = record.replace(old, new) + parts = record.split('/') + for part in parts: + if part == old: + self.data[idx] = record.replace(old, new) + break def search(self, pattern): for record in self.data: |