Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Protect process_contexthelp.py from IOError
  • Loading branch information
mbernasocchi committed Mar 31, 2016
1 parent afa20ec commit 2fb71b0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/process_contexthelp.py
Expand Up @@ -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\"')))
Expand Down

0 comments on commit 2fb71b0

Please sign in to comment.