Skip to content

Commit c680faf

Browse files
committed
Python: Add the word Error to a script
1 parent 4a095ed commit c680faf

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

Utilities/Python/scripts/make_smv_images.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@
4343
for i in range(len(folder)):
4444
print('generating smokeview image ' + case[i])
4545
os.chdir(outdir + folder[i])
46-
if os_name == "Linux":
47-
try:
46+
try:
47+
if os_name == "Linux":
4848
subprocess.run(['xvfb-run','-w','10','-s','-fp /usr/share/X11/fonts/misc -screen 0 1280x1024x24','-a',smokeview_path,
49-
'-bindir',bindir,'-runscript', case[i] ], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
50-
except subprocess.CalledProcessError as e:
51-
print(f"Smokeview failed with return code {e.returncode}")
52-
except FileNotFoundError:
53-
print(f"Smokeview executable not found: {smokeview_path}")
54-
else:
55-
subprocess.run([smokeview_path,'-bindir',bindir,'-runscript',case[i]], stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
49+
'-bindir',bindir,'-runscript', case[i] ], check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
50+
else:
51+
subprocess.run([smokeview_path,'-bindir',bindir,'-runscript',case[i]],
52+
check=True, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
53+
except subprocess.CalledProcessError as e:
54+
print(f"Error: Smokeview failed with return code {e.returncode}")
55+
except FileNotFoundError:
56+
print(f"Error: Smokeview executable not found: {smokeview_path}")
5657

5758
os.chdir(original_dir)
5859

0 commit comments

Comments
 (0)