Catch the exception if curses cant be imported

This commit is contained in:
Michael Lazar
2017-06-07 22:59:44 -04:00
parent 332ad463f7
commit a98a075bd8

View File

@@ -11,6 +11,18 @@ import warnings
import six import six
import requests import requests
# Need to check for curses comparability before performing the rtv imports
try:
import curses
except ImportError:
if sys.platform == 'win32':
sys.exit('Fatal Error: This program is not compatible with Windows '
'Operating Systems.\nPlease try installing on either Linux '
'or Mac OS')
else:
sys.exit('Fatal Error: Your python distribution appears to be missing '
'_curses.so.\nWas it compiled without support for curses?')
from . import docs from . import docs
from . import packages from . import packages
from .packages import praw from .packages import praw