From 34e13ccc675b6c91016ca22565baaf3651b3e90f Mon Sep 17 00:00:00 2001 From: Markus Zolliker Date: Wed, 8 Jun 2022 16:40:17 +0200 Subject: [PATCH] frappyman: raise from None --- frappyman.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frappyman.py b/frappyman.py index edbeab6..75e0e9c 100644 --- a/frappyman.py +++ b/frappyman.py @@ -55,8 +55,8 @@ class FrappyManager(ServiceManager): section = cfgparser['FRAPPY'] except KeyError: if exists(cfgfile): - raise KeyError('%s has no FRAPPY section' % cfgfile) - raise FileNotFoundError('%s does not exist' % cfgfile) + raise KeyError('%s has no FRAPPY section' % cfgfile) from None + raise FileNotFoundError('%s not found' % cfgfile) from None for cfgpath in section['confdir'].split(os.pathsep): if cfgpath.endswith(''): cfgpaths.append(cfgpath[:-6] + service)