From ded4895b7e590ab60b5349f6a22e983782191adb Mon Sep 17 00:00:00 2001 From: Bram Date: Sat, 1 Sep 2018 02:50:22 +0200 Subject: [PATCH] [mod] misc, better error message I'm using repr to be able to detect if it's a string or a number since it's an error I'm expecting --- data/hooks/diagnosis/10-ip.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/hooks/diagnosis/10-ip.py b/data/hooks/diagnosis/10-ip.py index 898a6ac0f..574741da9 100644 --- a/data/hooks/diagnosis/10-ip.py +++ b/data/hooks/diagnosis/10-ip.py @@ -45,7 +45,7 @@ class IPDiagnoser(Diagnoser): elif protocol == 6: url = 'https://ip6.yunohost.org' else: - raise ValueError("invalid protocol version") + raise ValueError("invalid protocol version, it should be either 4 or 6 and was '%s'" % repr(protocol)) try: return download_text(url, timeout=30).strip()