diff --git a/httpie/__init__.py b/httpie/__init__.py index 7f8a64f4..6c7fe03b 100644 --- a/httpie/__init__.py +++ b/httpie/__init__.py @@ -3,7 +3,7 @@ HTTPie - a CLI, cURL-like tool for humans. """ __author__ = 'Jakub Roztocil' -__version__ = '0.9.6' +__version__ = '1.0.0-dev' __licence__ = 'BSD' diff --git a/httpie/context.py b/httpie/context.py index f14de856..bc555863 100644 --- a/httpie/context.py +++ b/httpie/context.py @@ -1,4 +1,8 @@ import sys +try: + import curses +except ImportError: + curses = None # Compiled w/o curses from httpie.compat import is_windows from httpie.config import DEFAULT_CONFIG_DIR, Config @@ -28,17 +32,12 @@ class Environment(object): stderr_isatty = stderr.isatty() colors = 256 if not is_windows: - import curses - try: - curses.setupterm() + if curses: try: + curses.setupterm() colors = curses.tigetnum('colors') - except TypeError: - # pypy3 (2.4.0) - colors = curses.tigetnum(b'colors') - except curses.error: - pass - del curses + except curses.error: + pass else: # noinspection PyUnresolvedReferences import colorama.initialise