(self, name)
| 479 | return cache_name |
| 480 | |
| 481 | def stored_name(self, name): |
| 482 | cleaned_name = self.clean_name(name) |
| 483 | hash_key = self.hash_key(cleaned_name) |
| 484 | cache_name = self.hashed_files.get(hash_key) |
| 485 | if cache_name: |
| 486 | return cache_name |
| 487 | # No cached name found, recalculate it from the files. |
| 488 | intermediate_name = name |
| 489 | for i in range(self.max_post_process_passes + 1): |
| 490 | cache_name = self.clean_name( |
| 491 | self.hashed_name(name, content=None, filename=intermediate_name) |
| 492 | ) |
| 493 | if intermediate_name == cache_name: |
| 494 | # Store the hashed name if there was a miss. |
| 495 | self.hashed_files[hash_key] = cache_name |
| 496 | return cache_name |
| 497 | else: |
| 498 | # Move on to the next intermediate file. |
| 499 | intermediate_name = cache_name |
| 500 | # If the cache name can't be determined after the max number of passes, |
| 501 | # the intermediate files on disk may be corrupt; avoid an infinite |
| 502 | # loop. |
| 503 | raise ValueError("The name '%s' could not be hashed with %r." % (name, self)) |
| 504 | |
| 505 | |
| 506 | class ManifestFilesMixin(HashedFilesMixin): |
nothing calls this directly
no test coverage detected