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

Unified Diff: mojo/public/tools/bindings/generators/mojom_dart_generator.py

Issue 1834893002: Treat empty string DartPackage as no DartPackage specified (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 9 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 | « mojo/dart/tools/presubmit/check_mojom_dart.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/tools/bindings/generators/mojom_dart_generator.py
diff --git a/mojo/public/tools/bindings/generators/mojom_dart_generator.py b/mojo/public/tools/bindings/generators/mojom_dart_generator.py
index 59396d5018c84c4e44ed0df46063d689cde3b622..32f223d4c2a4d17b0040f31aea69c12fd00ff91f 100644
--- a/mojo/public/tools/bindings/generators/mojom_dart_generator.py
+++ b/mojo/public/tools/bindings/generators/mojom_dart_generator.py
@@ -445,7 +445,10 @@ def ParseStringAttribute(attribute):
def GetPackage(module):
if module.attributes and 'DartPackage' in module.attributes:
- return ParseStringAttribute(module.attributes['DartPackage'])
+ package = ParseStringAttribute(module.attributes['DartPackage'])
+ package = package.strip()
+ if package != '':
+ return package
# Default package.
return 'mojom'
« no previous file with comments | « mojo/dart/tools/presubmit/check_mojom_dart.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698