Skip to content

Commit 5aaf9b9

Browse files
authored
Merge pull request #1248 from nstelter-slac/fix_ss_reading
BUG: cleanup stylesheet readin code, also stops FileNotFoundError error when cancel out stylesheet selecting window
2 parents eddb121 + 027e192 commit 5aaf9b9

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

pydm/main_window.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -377,10 +377,9 @@ def change_stylesheet_action(self, checked):
377377
self, "Change Stylesheet...", folder, "PyDM Stylesheets (*.qss *.css)"
378378
)
379379

380-
if ss_filename:
381-
ss_filename = str(ss_filename)
382-
self.ss_path = ss_filename.split("'")
383-
style = open(self.ss_path[1], "r")
380+
ss_path = str(ss_filename[0])
381+
if ss_path:
382+
style = open(ss_path, "r")
384383
style = style.read()
385384
self.setStyleSheet(style)
386385

0 commit comments

Comments
 (0)