@@ -43,6 +43,7 @@ def __init__(self, firefox_path=None, log_file=None):
43
43
# a while the pipe would fill up and Firefox would freeze.
44
44
self ._log_file = log_file or open (os .devnull , "wb" )
45
45
self .command_line = None
46
+ self .platform = system ().lower ()
46
47
if not self ._start_cmd :
47
48
self ._start_cmd = self ._get_firefox_start_cmd ()
48
49
if not self ._start_cmd .strip ():
@@ -59,7 +60,6 @@ def __init__(self, firefox_path=None, log_file=None):
59
60
self ._firefox_env ["MOZ_CRASHREPORTER_DISABLE" ] = "1"
60
61
self ._firefox_env ["MOZ_NO_REMOTE" ] = "1"
61
62
self ._firefox_env ["NO_EM_RESTART" ] = "1"
62
- self .platform = system ().lower ()
63
63
64
64
def add_command_line_options (self , * args ):
65
65
self .command_line = args
@@ -149,12 +149,12 @@ def _find_exe_in_registry(self):
149
149
def _get_firefox_start_cmd (self ):
150
150
"""Return the command to start firefox."""
151
151
start_cmd = ""
152
- if self .platform == "darwin" : # small darwin due to lower() in self.platform
152
+ if self .platform == "darwin" : # small darwin due to lower() in self.platform
153
153
start_cmd = "/Applications/Firefox.app/Contents/MacOS/firefox-bin"
154
154
# fallback to homebrew installation for mac users
155
155
if not os .path .exists (start_cmd ):
156
156
start_cmd = os .path .expanduser ("~" ) + start_cmd
157
- elif self .platform == "windows" : # same
157
+ elif self .platform == "windows" : # same
158
158
start_cmd = (self ._find_exe_in_registry () or self ._default_windows_location ())
159
159
elif self .platform == 'java' and os ._name == 'nt' :
160
160
start_cmd = self ._default_windows_location ()
0 commit comments