From 7ad1d0e0af695fa7f872b740a1bb7b2897eb41bd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 11 May 2023 11:25:01 +0200 Subject: Adding upstream version 0.8.1. Signed-off-by: Daniel Baumann --- eos_downloader/tools.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 eos_downloader/tools.py (limited to 'eos_downloader/tools.py') diff --git a/eos_downloader/tools.py b/eos_downloader/tools.py new file mode 100644 index 0000000..a0f971a --- /dev/null +++ b/eos_downloader/tools.py @@ -0,0 +1,13 @@ +#!/usr/bin/python +# coding: utf-8 -*- + +"""Module for tools related to ardl""" + + +def exc_to_str(exception: Exception) -> str: + """ + Helper function to parse Exceptions + """ + return ( + f"{type(exception).__name__}{f' ({str(exception)})' if str(exception) else ''}" + ) -- cgit v1.2.3