Closed
Bug 1605465
Opened 4 years ago
Closed 4 years ago
"moz-phab patch" throws exception when logging "patching revision"
Categories
(Conduit :: moz-phab, defect, P1)
Conduit
moz-phab
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mhentges, Assigned: mhentges)
Details
Attachments
(1 file)
To reproduce:
- Open a terminal in
mozilla-central
moz-phab patch D57796
Assignee | ||
Updated•4 years ago
|
Assignee: nobody → mhentges
Assignee | ||
Updated•4 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•4 years ago
|
||
We recently modified our logging logic to use the built-in formatting (%-style). I'm guessing that this refactor
caused the issue fixed in this commit - one of the logger.info(...) calls was receiving a tuple, rather than just a bunch
of positional arguments.
Assignee | ||
Updated•4 years ago
|
Priority: -- → P1
Assignee | ||
Comment 2•4 years ago
|
||
The stack trace is:
--- Logging error ---
Traceback (most recent call last):
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 986, in emit
msg = self.format(record)
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 836, in format
return fmt.format(record)
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 4941, in format
result = super().format(record)
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 573, in format
record.message = record.getMessage()
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 336, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
File "/home/mitch/.pyenv/versions/3.5.9/bin/moz-phab", line 11, in <module>
load_entry_point('MozPhab', 'console_scripts', 'moz-phab')()
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 5320, in run
main(sys.argv[1:])
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 5300, in main
args.func(repo, args)
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 4713, in patch
("s" if len(revs) > 1 else "", " ".join(["D%s" % r["id"] for r in revs])),
Message: 'Patching revision%s: %s'
Arguments: (('', 'D57796'),)
--- Logging error ---
Traceback (most recent call last):
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/handlers.py", line 71, in emit
if self.shouldRollover(record):
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/handlers.py", line 187, in shouldRollover
msg = "%s\n" % self.format(record)
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 836, in format
return fmt.format(record)
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 573, in format
record.message = record.getMessage()
File "/home/mitch/.pyenv/versions/3.5.9/lib/python3.5/logging/__init__.py", line 336, in getMessage
msg = msg % self.args
TypeError: not enough arguments for format string
Call stack:
File "/home/mitch/.pyenv/versions/3.5.9/bin/moz-phab", line 11, in <module>
load_entry_point('MozPhab', 'console_scripts', 'moz-phab')()
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 5320, in run
main(sys.argv[1:])
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 5300, in main
args.func(repo, args)
File "/home/mitch/dev/conduit/review/mozphab/mozphab.py", line 4713, in patch
("s" if len(revs) > 1 else "", " ".join(["D%s" % r["id"] for r in revs])),
Message: 'Patching revision%s: %s'
Arguments: (('', 'D57796'),)
Assignee | ||
Comment 3•4 years ago
|
||
This should be fixed in the newly-released 0.1.71
moz-phab
.
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•