create the exception identifier
(data)
| 86 | |
| 87 | |
| 88 | def create_identifier(data): |
| 89 | """ |
| 90 | create the exception identifier |
| 91 | """ |
| 92 | obj = hashlib.sha1() |
| 93 | try: |
| 94 | obj.update(data) |
| 95 | except: |
| 96 | obj.update(data.encode("utf-8")) |
| 97 | return obj.hexdigest()[1:10] |
| 98 | |
| 99 | |
| 100 | def get_token(path): |
no outgoing calls
no test coverage detected