Skip to content

Commit

Permalink
issue #1361 no more linux2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lee Kamentsky committed May 15, 2015
1 parent 4051816 commit 046b27c
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CellProfiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ def parse_args(args):
default=False)

default_show_gui = True
if sys.platform == 'linux2':
if sys.platform.startswith('linux'):
if not os.getenv('DISPLAY'):
default_show_gui = False

Expand Down
2 changes: 1 addition & 1 deletion cellprofiler/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ def wait(self):
"%s is not executable" % cp_executable
args = (["arch", "-x86_64", "-i386", cp_executable] +
aw_args)
elif sys.platform == 'linux2':
elif sys.platform.startswith('linux'):
aw_path = os.path.join(os.path.dirname(__file__),
"analysis_worker.py")
args = [sys.executable, aw_path] + aw_args
Expand Down
2 changes: 1 addition & 1 deletion cellprofiler/gui/pipelinelistview.py
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ def add_transparent_window_for_tooltip(self, input_list_ctrl):
# display a tooltip over a transparent window in front of the disabled
# window.
#
if sys.platform == 'linux2':
if sys.platform.startswith('linux'):
self.transparent_window = None
return # Doesn't work right.
transparent_window = wx.Panel(self.__panel)
Expand Down
3 changes: 2 additions & 1 deletion cellprofiler/modules/tests/test_loadimages.py
Original file line number Diff line number Diff line change
Expand Up @@ -1770,7 +1770,8 @@ def test_06_06_allowed_conflict(self):
#
# Also happens on at least one Centos build.
#
if os.stat_float_times() and not sys.platform in ("darwin", "linux2"):
if os.stat_float_times() and not any([
sys.platform.startswith(x) for x in ("darwin", "linux")]):
time.sleep(.1)
else:
time.sleep(1)
Expand Down
2 changes: 1 addition & 1 deletion cellprofiler/tests/test_nowx.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def import_all_but_wx(name,
raise ImportError("Not allowed to import wx!")
return default_import(name, globals, locals, fromlist, level)

@unittest.skipIf(sys.platform == 'linux2', "Do not test under Linux")
@unittest.skipIf(sys.platform.startswith('linux'), "Do not test under Linux")
class TestNoWX(unittest.TestCase):
def setUp(self):
from cellprofiler.preferences import set_headless, set_temporary_directory
Expand Down

0 comments on commit 046b27c

Please sign in to comment.