Skip to content
Snippets Groups Projects
Commit f0c9443d authored by Marko Mecina's avatar Marko Mecina
Browse files

make opening documentation browser-agnostic

parent 38722561
No related branches found
No related tags found
No related merge requests found
......@@ -3,13 +3,17 @@
Opens the documentation of the confignator package in firefox.
"""
import os
import webbrowser
from confignator import config
def open_documentation_in_firefox():
docu = config.get_option('confignator-paths', 'docu')
command = 'firefox ' + docu
os.system(command)
if not os.path.isfile(docu):
raise FileNotFoundError('Documentation not found: {}. Try rebuilding it.'.format(docu))
webbrowser.open(docu)
if __name__ == '__main__':
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment