Skip to content

Commit 230f762

Browse files
committed
Cleanup.
1 parent 4350c41 commit 230f762

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

sanity/checker.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import sys
12
import os
23
import subprocess as sp
34

@@ -19,7 +20,12 @@ def __init__(self):
1920
path = path + os.path.sep
2021

2122
self.path = path if path else ''
22-
23+
24+
def checkOS(self):
25+
return (sys.platform.startswith('freebsd') or
26+
sys.platform.startswith('linux') or
27+
sys.platform.startswith('darwin'))
28+
2329

2430
def checkSwitch(self):
2531
compiler_type = os.getenv('LLVM_COMPILER')

wllvm-sanity-checker

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,15 @@
55
#
66

77
import sys
8-
import os
98
from sanity.checker import *
109

1110
def main(args):
1211

13-
14-
if not (sys.platform.startswith('freebsd') or
15-
sys.platform.startswith('linux') or
16-
sys.platform.startswith('darwin')):
17-
print 'I do not think we support your OS. Sorry.'
18-
return 1
19-
2012
checker = Checker()
2113

14+
if not checker.checkOS():
15+
print 'I do not think we support your OS. Sorry.'
16+
return 1
2217

2318
success = checker.checkCompiler()
2419

0 commit comments

Comments
 (0)