Trying to update $BROWSER
This commit is contained in:
@@ -23,6 +23,13 @@ except ImportError:
|
|||||||
sys.exit('Fatal Error: Your python distribution appears to be missing '
|
sys.exit('Fatal Error: Your python distribution appears to be missing '
|
||||||
'_curses.so.\nWas it compiled without support for curses?')
|
'_curses.so.\nWas it compiled without support for curses?')
|
||||||
|
|
||||||
|
# If we want to override the $BROWSER variable that the python webbrowser
|
||||||
|
# references, it needs to be done before the webbrowser module is imported
|
||||||
|
# for the first time.
|
||||||
|
RTV_BROWSER, BROWSER = os.environ.get('RTV_BROWSER'), os.environ.get('BROWSER')
|
||||||
|
if RTV_BROWSER:
|
||||||
|
os.environ['BROWSER'] = RTV_BROWSER
|
||||||
|
|
||||||
from . import docs
|
from . import docs
|
||||||
from . import packages
|
from . import packages
|
||||||
from .packages import praw
|
from .packages import praw
|
||||||
@@ -110,8 +117,8 @@ def main():
|
|||||||
('$XDG_CONFIG_HOME', os.getenv('XDG_CONFIG_HOME')),
|
('$XDG_CONFIG_HOME', os.getenv('XDG_CONFIG_HOME')),
|
||||||
('$RTV_EDITOR', os.getenv('RTV_EDITOR')),
|
('$RTV_EDITOR', os.getenv('RTV_EDITOR')),
|
||||||
('$RTV_URLVIEWER', os.getenv('RTV_URLVIEWER')),
|
('$RTV_URLVIEWER', os.getenv('RTV_URLVIEWER')),
|
||||||
('$RTV_BROWSER', os.getenv('RTV_BROWSER')),
|
('$RTV_BROWSER', RTV_BROWSER),
|
||||||
('$BROWSER', os.getenv('BROWSER')),
|
('$BROWSER', BROWSER),
|
||||||
('$PAGER', os.getenv('PAGER')),
|
('$PAGER', os.getenv('PAGER')),
|
||||||
('$VISUAL', os.getenv('VISUAL')),
|
('$VISUAL', os.getenv('VISUAL')),
|
||||||
('$EDITOR', os.getenv('EDITOR'))]
|
('$EDITOR', os.getenv('EDITOR'))]
|
||||||
@@ -139,6 +146,8 @@ def main():
|
|||||||
warnings.warn(text)
|
warnings.warn(text)
|
||||||
config['ascii'] = True
|
config['ascii'] = True
|
||||||
|
|
||||||
|
_logger.info('RTV module path: %s', os.path.abspath(__file__))
|
||||||
|
|
||||||
# Check the praw version
|
# Check the praw version
|
||||||
if packages.__praw_bundled__:
|
if packages.__praw_bundled__:
|
||||||
_logger.info('Using packaged PRAW distribution, '
|
_logger.info('Using packaged PRAW distribution, '
|
||||||
|
|||||||
Reference in New Issue
Block a user