| Conditions | 3 |
| Total Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| 1 | import hashlib |
||
| 18 | @classmethod |
||
| 19 | def get_md5(cls, file): |
||
| 20 | try: |
||
| 21 | return cls._md5_sum[file] |
||
| 22 | except KeyError: |
||
| 23 | with cls._counter_lock: |
||
| 24 | md5 = base64.urlsafe_b64encode(cls.calc_md5(file)) |
||
| 25 | value = '%s%s?v=%s' % (STATIC_URL, file, md5.decode('utf-8')) |
||
| 26 | cls._md5_sum[file] = value |
||
| 27 | return value |
||
| 28 | |||
| 45 |