Skip to content
Permalink
Browse files

Merge pull request #2958 from mbernasocchi/master

Protect process_contexthelp.py from IOError
  • Loading branch information
m-kuhn committed Mar 31, 2016
2 parents afa20ec + 2fb71b0 commit 625be7a9ab5c10289da798ced73b8c88aa2ed710
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 625be7a

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