Closed
Bug 1027501
Opened 9 years ago
Closed 9 years ago
print-manifest-dirs.py run-time error: UnboundLocalError: local variable 'testURLs' referenced before assignment
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
DUPLICATE
of bug 1027215
People
(Reporter: u459114, Assigned: u459114)
Details
Attachments
(1 file, 4 obsolete files)
Refer to error log: https://tbpl.mozilla.org/php/getParsedLog.php?id=42022083&tree=Try&full=1#error0 UnboundLocalError: local variable 'testURLs' referenced before assignment Source code: http://dxr.mozilla.org/mozilla-central/source/layout/tools/reftest/print-manifest-dirs.py If all the conditions between #41~#51 do not match, using testURLs at #53 issues an UnboundLocalError error. PS Not quite sure whether this bug belongs to gfx, but since I found it while debugging a gfx issue, assign this as Graphic bug first.
According to bug 1000722 comment 35, we may improve error handling in parseManifest here. "<<<<<<< local" is a string that parseManifest does not expect.
Comment 2•9 years ago
|
||
We might add an "else" statement before "for u in testURLs:", and raise an customized exception such as ManifestParseError to print file name, line number, and the content of that line.
Comment on attachment 8442701 [details] [diff] [review] bug_1027501 Review of attachment 8442701 [details] [diff] [review]: ----------------------------------------------------------------- Hi TY, How about this one?
Attachment #8442701 -
Flags: feedback?(tlin)
Comment 5•9 years ago
|
||
Comment on attachment 8442701 [details] [diff] [review] bug_1027501 Review of attachment 8442701 [details] [diff] [review]: ----------------------------------------------------------------- ::: layout/tools/reftest/print-manifest-dirs.py @@ +49,5 @@ > elif items[0] == "load" or items[0] == "script": > testURLs = [items[1]] > elif items[0] == "==" or items[0] == "!=": > testURLs = items[1:3] > + else Syntax error. It should be "else:"
Attachment #8442701 -
Flags: feedback?(tlin) → feedback-
Attachment #8442701 -
Attachment is obsolete: true
Attachment #8442719 -
Flags: feedback?(tlin)
Attachment #8442719 -
Attachment is patch: true
Attachment #8442719 -
Attachment is obsolete: true
Attachment #8442719 -
Flags: feedback?(tlin)
Attachment #8442723 -
Flags: feedback?(tlin)
Comment 8•9 years ago
|
||
Comment on attachment 8442723 [details] [diff] [review] bug_1027501 Review of attachment 8442723 [details] [diff] [review]: ----------------------------------------------------------------- Looks good to me. However, the patch does not have a e-mail address.
Attachment #8442723 -
Flags: feedback?(tlin) → feedback+
Attachment #8442723 -
Attachment is obsolete: true
Assignee | ||
Comment 10•9 years ago
|
||
Attachment #8442727 -
Attachment is obsolete: true
Assignee | ||
Comment 11•9 years ago
|
||
Comment on attachment 8442728 [details] [diff] [review] Print error message while input string syntax is not right Hi dbaron, Please help to review this patch, thanks
Attachment #8442728 -
Flags: review?(dbaron)
Updated•9 years ago
|
Attachment #8442728 -
Flags: review?(dbaron) → review?(ted)
Comment 12•9 years ago
|
||
It seems gps is going to rewrite print-manifest-dirs.py in bug 1027215. I hope the new version will have better error handling.
Assignee | ||
Comment 13•9 years ago
|
||
Yes, I saw you comment in attachment 8442961 [details] [diff] [review]. Close this one
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Updated•9 years ago
|
Attachment #8442728 -
Flags: review?(ted)
You need to log in
before you can comment on or make changes to this bug.
Description
•