Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(282)

Unified Diff: grit/format/rc.py

Issue 1194063002: grit: Add fallback_to_default_layout attribute to <output> (Closed) Base URL: https://chromium.googlesource.com/external/grit-i18n.git@master
Patch Set: for landing Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | grit/gather/chrome_scaled_image.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: grit/format/rc.py
diff --git a/grit/format/rc.py b/grit/format/rc.py
index c766eff156ccd93fa4272021de8ed3a4320bd674..eb8efaca1d9f9217450841ef24ae9245957c4734 100644
--- a/grit/format/rc.py
+++ b/grit/format/rc.py
@@ -432,7 +432,11 @@ def FormatInclude(item, lang, output_dir, type=None, process_html=False):
#
# The FileForLanguage() Function has the side effect of generating the file
# if needed (e.g. if it is an HTML file include).
- filename = os.path.abspath(item.FileForLanguage(lang, output_dir))
+ file_for_lang = item.FileForLanguage(lang, output_dir)
+ if file_for_lang is None:
+ return ''
+
+ filename = os.path.abspath(file_for_lang)
if process_html:
filename = item.Process(output_dir)
elif filename_only:
« no previous file with comments | « no previous file | grit/gather/chrome_scaled_image.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698