Skip to content

Commit b89a8a2

Browse files
committed
ENH: require iconpath returns existing file
It is an internal function which should return valid paths for correct installation and code. Make it easier to detect invalid icon paths. Resolve #36.
1 parent 292d435 commit b89a8a2

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/diffpy/pdfgui/gui/pdfguiglobals.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ def iconpath(iconfilename):
5959
Return string.
6060
"""
6161
rv = os.path.join(APPDATADIR, 'icons', iconfilename)
62+
assert os.path.isfile(rv), "icon file does not exist"
6263
return rv
6364

6465

0 commit comments

Comments
 (0)