Change connection errors to warnings.

This commit is contained in:
tecnovert
2021-09-02 22:42:26 +02:00
parent 0d0ffe6fe4
commit 146c9b784c
3 changed files with 47 additions and 28 deletions

View File

@@ -134,3 +134,7 @@ class BaseApp:
if len(out[1]) > 0:
raise ValueError('CLI error ' + str(out[1]))
return out[0].decode('utf-8').strip()
def is_transient_error(ex):
str_error = str(ex).tolower()
return 'read timed out' in str_error or 'no connection to daemon' in str_error