Skip to content

Commit 625be7a

Browse files
committed
Merge pull request #2958 from mbernasocchi/master
Protect process_contexthelp.py from IOError
2 parents afa20ec + 2fb71b0 commit 625be7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

scripts/process_contexthelp.py

+3
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616

1717
for f in sorted(glob.glob('resources/context_help/*')):
1818
n = os.path.basename(f)
19+
if os.path.isdir(f):
20+
# Protect from IOError: [Errno 21] Is a directory
21+
continue
1922
with open(f) as content:
2023
cpp.write("\n gContextHelpTexts.insert( \"{0}\", QCoreApplication::translate( \"context_help\", \"{1}\") );".format(
2124
n, content.read().replace("\\", "\").replace('\\', '\\\\').replace('"', '\\"').replace('\n', '\\n"\n\"')))

0 commit comments

Comments
 (0)