(self, filename)
| 45 | return self.attribute in contents |
| 46 | |
| 47 | def UpgradeFile(self, filename): |
| 48 | with open(filename, 'r') as f: |
| 49 | contents = f.read() |
| 50 | while True: |
| 51 | try: |
| 52 | contents = _RemoveAttribute(contents, self.attribute) |
| 53 | except StopIteration: |
| 54 | break |
| 55 | with open(filename, 'w') as f: |
| 56 | f.write(contents) |
| 57 | |
| 58 | class ConvertRocks(BaseFileUpgrade): |
| 59 | def AppliesToFile(self, filename): |
nothing calls this directly
no test coverage detected