summaryrefslogtreecommitdiffstats
path: root/src/utils/tiptorrent.py
Commit message (Collapse)AuthorAgeFilesLines
* src: centralize error logging into send_internal_server_errorAlejandro Sirgo Rica2024-03-211-13/+7
| | | | | | | | | | | | | | | | | | | | Use only the exception messages as the main resource for error messages. The previous error code had string duplication in the form of: logging.error('msg here') raise Exception('msg here') That approach also has the downside of having log duplication as it had the local logging.err() and a global logging.exception() inside send_internal_server_error capturing the exception message. The actual code only requires raising an exception with a proper error message. Improve exception messages to give more error context. Log every AssertionError as a backtrace. Use the 'raise Exception from e' syntax to modify the a previously raised exception 'e' into an exception with aditional context or different type. This also prevents the message that warns about newer exceptions being launch after an initial exception.
* src: improve logging messagesJose M. Guisado2023-08-011-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | Some users have mistakenly reported tiptorrent problems when the process takes a long time. Specifically by rebooting or powering off the client in the middle of the md5sum computation stage, just after the tiptorrent transfer. Same problem occurs when image creation command takes a long period of time. In order to help the user understand the different stages of commands such as image creation or image restore using tiptorrent, the following changes have been made to the current logging solution: - Add log messages to warn users not to reboot or shut down the client during a tiptorrent transfer, and also during the md5sum computation stage. - Add a log message telling the user that the image creation processes have started. - Use logging.exception inside "except:" blocks to print a traceback with the log messsage. (https://docs.python.org/3/library/logging.html#logging.exception)
* src: add missing copyright noticesv1.2.8Jose M. Guisado2023-04-181-0/+8
|
* live: improve error pathsv1.2.3Jose M. Guisado2022-11-171-2/+9
| | | | | | | | | | | | | Fix error paths in live operations which do not reset the "browser" to the main page (one with the menu). Add error logging messages when: * _restartBrowser fails. * ogChangeRepo fails. Improve checksum fetch error handling. For example, when an invalid repository IP is specified.
* tiptorrent: improve raised exceptions for tip_client_getJose M. Guisado2022-09-291-4/+2
| | | | | | Raise exception when tiptorrent-client subprocess runs normally but exits with non-zero code. (For example, if download file allocation failed)
* live: rewrite image_restoreJose M. Guisado2022-09-141-6/+3
| | | | | | | | Integrates image restore command into native ogClient code. Further reduces the need for external Bash scripts. After a succesful image restore, OS configuration is still using external Bash script "osConfigure/osConfigureCustom".
* utils: add tiptorrent.pyJose M. Guisado2022-09-141-0/+90
Utility and wrapper functions related to the usage of tiptorrent. To be used by the image restore command.