(filename=model_filename, sha1=frontmatter['sha1'])
| 61 | |
| 62 | # Closure-d function for checking SHA1. |
| 63 | def model_checks_out(filename=model_filename, sha1=frontmatter['sha1']): |
| 64 | with open(filename, 'rb') as f: |
| 65 | return hashlib.sha1(f.read()).hexdigest() == sha1 |
| 66 | |
| 67 | # Check if model exists. |
| 68 | if os.path.exists(model_filename) and model_checks_out(): |
no outgoing calls
no test coverage detected