We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bb90977 commit 1775077Copy full SHA for 1775077
1 file changed
app.py
@@ -14,6 +14,11 @@
14
from subprocess import Popen, PIPE, STDOUT
15
from multiprocessing import Pool, cpu_count
16
17
+is_linux = True
18
+
19
+if os.name == "nt":
20
+ is_linux = False
21
22
# Configure Flask App
23
app = Flask(__name__)
24
app.config['SECRET_KEY'] = 'secret!'
@@ -163,13 +168,13 @@ def process_error(error):
163
168
164
169
# Detect OS
165
170
line_num = None
166
- if os.name == "nt":
167
- line_num = error.split(":")[2]
- else:
171
+ if is_linux:
172
try:
173
line_num = error.split(":")[1]
174
except Exception as e:
175
print(os.name + " not compatible: " + e)
176
+ else:
177
+ line_num = error.split(":")[2]
178
179
# list_words.pop(0)
180
error_yet = False
0 commit comments