mirror of
https://github.com/qgis/QGIS.git
synced 2025-12-15 00:07:25 -05:00
Merge pull request #2958 from mbernasocchi/master
Protect process_contexthelp.py from IOError
This commit is contained in:
commit
625be7a9ab
@ -16,6 +16,9 @@ cpp.write(
|
||||
|
||||
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\"')))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user