From cb4ebb017ff6157cabac56f927ec5a2aac9be6d9 Mon Sep 17 00:00:00 2001 From: Sebastian Lohff Date: Mon, 3 Aug 2015 05:33:57 +0200 Subject: [PATCH] Only catch ValueError, not all exceptions --- servefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/servefile b/servefile index e3aaa9d..81ec250 100755 --- a/servefile +++ b/servefile @@ -102,7 +102,7 @@ class FileBaseHandler(BaseHTTPServer.BaseHTTPRequestHandler): try: fromto[0] = int(fromto[0]) fromto[1] = int(fromto[1]) - except: + except ValueError: return (False, None) if fromto[0] >= fileLength or fromto[0] < 0 or fromto[1] >= fileLength or fromto[1]-fromto[0] < 0: