Skip to content
Permalink
Browse files

Protect process_contexthelp.py from IOError

  • Loading branch information
mbernasocchi committed Mar 31, 2016
1 parent afa20ec commit 2fb71b02c4fb0a3316707c3efdc0214a81c2239f
Showing with 3 additions and 0 deletions.
  1. +3 −0 scripts/process_contexthelp.py
@@ -16,6 +16,9 @@

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

0 comments on commit 2fb71b0

Please sign in to comment.
You can’t perform that action at this time.