Commit 638a5c75 authored by David Tseng's avatar David Tseng Committed by Commit Bot

Fix unhelpful presubmit message

Before:
  File "/usr/local/google/home/dtseng/projects/chrome/src/third_party/chromevox/third_party/closure-library/closure/bin/build/depstree.py", line 56, in __init__
    raise NamespaceNotFoundError(require, source)
NamespaceNotFoundError: Namespace "cvox.AbstractEarcons" never provided. Required in <jsbundler.SourceWithPaths object at 0x7fcc566aa150>

After:
  File "/usr/local/google/home/dtseng/projects/chrome/src/third_party/chromevox/third_party/closure-library/closure/bin/build/depstree.py", line 56, in __init__
    raise NamespaceNotFoundError(require, source)
NamespaceNotFoundError: Namespace "cvox.AbstractEarcons" never provided. Required in common/classic_earcons.js
Issue:
closure-library/closure/bin/build/depstree.py
(part of Closure Library code)
does:
          raise NamespaceNotFoundError(require, source)

but |source| has no stringification that's friendly so you get the raw
jsbundler.SourceWithPaths
(which inherits from the Closure Library |Source| class).

Fix by providing __str__ in the jsbundler.SourceWithPaths object (so we don't have to mod Closure Library).

Change-Id: I72ca69869690661aabebc2b68843d7b2a8e6d428
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1929915Reviewed-by: default avatarSteven Bennetts <stevenjb@chromium.org>
Commit-Queue: David Tseng <dtseng@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718269}
parent 5338c7ff
...@@ -72,6 +72,8 @@ class SourceWithPaths(source.Source): ...@@ -72,6 +72,8 @@ class SourceWithPaths(source.Source):
def GetOutPath(self): def GetOutPath(self):
return self._out_path return self._out_path
def __str__(self):
return self.GetOutPath()
class Bundle(): class Bundle():
'''An ordered list of sources without duplicates.''' '''An ordered list of sources without duplicates.'''
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment