diff options
author | mathieui <mathieui@mathieui.net> | 2016-08-24 23:13:21 +0200 |
---|---|---|
committer | mathieui <mathieui@mathieui.net> | 2016-08-24 23:13:21 +0200 |
commit | ec04070611e546cfc1ac5c2e2ea2dc2a29708b37 (patch) | |
tree | c1106d50a332b22d2edcd39d5d2fbae1226efe7b /poezio/theming.py | |
parent | 3ed31ed282f1290db167f0c169447defc22b2d1f (diff) | |
download | poezio-ec04070611e546cfc1ac5c2e2ea2dc2a29708b37.tar.gz poezio-ec04070611e546cfc1ac5c2e2ea2dc2a29708b37.tar.bz2 poezio-ec04070611e546cfc1ac5c2e2ea2dc2a29708b37.tar.xz poezio-ec04070611e546cfc1ac5c2e2ea2dc2a29708b37.zip |
Don’t traceback in theming if called without poezio installed
If we just want to see the color list, we shouldn’t need to be able to
import poezio.config
Diffstat (limited to 'poezio/theming.py')
-rwxr-xr-x | poezio/theming.py | 6 |
1 files changed, 5 insertions, 1 deletions
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 |