From ec04070611e546cfc1ac5c2e2ea2dc2a29708b37 Mon Sep 17 00:00:00 2001 From: mathieui Date: Wed, 24 Aug 2016 23:13:21 +0200 Subject: =?UTF-8?q?Don=E2=80=99t=20traceback=20in=20theming=20if=20called?= =?UTF-8?q?=20without=20poezio=20installed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If we just want to see the color list, we shouldn’t need to be able to import poezio.config --- poezio/theming.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/poezio/theming.py b/poezio/theming.py index 0ead632e..c740b86e 100755 --- a/poezio/theming.py +++ b/poezio/theming.py @@ -66,7 +66,11 @@ It is used for example to define color gradient, etc. import logging log = logging.getLogger(__name__) -from poezio.config import config +try: + from poezio.config import config +except ImportError: + if __name__ != "__main__": + raise import curses import functools -- cgit v1.2.3