Skip to content

Commit

Permalink
Merge pull request #1080 from Zelgadis87/optional-webbrowser
Browse files Browse the repository at this point in the history
Optional webbrowser
  • Loading branch information
miigotu committed Feb 28, 2016
2 parents 0a2fb22 + 4c0f032 commit 56bcece
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sickbeard/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
# along with SickRage. If not, see <http://www.gnu.org/licenses/>.
# pylint: disable=too-many-lines

import webbrowser
import datetime
import socket
import os
Expand Down Expand Up @@ -2165,6 +2164,13 @@ def save_config(): # pylint: disable=too-many-statements, too-many-branches


def launchBrowser(protocol='http', startPort=None, web_root='/'):

try:
import webbrowser
except ImportError:
logger.log(u"Unable to load the webbrowser module, cannot launch the browser.", logger.WARNING)
return

if not startPort:
startPort = WEB_PORT

Expand Down

0 comments on commit 56bcece

Please sign in to comment.