Conditions | 3 |
Total Lines | 14 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | # -*- coding: utf-8 -*- |
||
29 | def is_done(self, http_status: int, contents: str) -> bool: |
||
30 | if http_status == 200: |
||
31 | # <ENCRYPT_FOOTER>2abfa6f6507044fec995efede5d818e62a0b19b5</ENCRYPT_FOOTER> means ERROR (invalid ADDRESS!) |
||
32 | if "<ENCRYPT_FOOTER>2abfa6f6507044fec995efede5d818e62a0b19b5</ENCRYPT_FOOTER>" in contents: |
||
33 | self.error = "INVALID URI: {}".format(self.file_uri) |
||
34 | self.success = False |
||
35 | return True |
||
36 | self.response = contents |
||
37 | self.result = ChecksumResult(contents) |
||
38 | self.success = True |
||
39 | return True |
||
40 | self.error = "HTTP {}".format(http_status) |
||
41 | self.success = False |
||
42 | return True |
||
43 |
The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:
If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.