fix log output when running with -u machineui -q #64
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Looks like no one's run offlineimap with both -u machineui and -q, at least
in a while. This patch fixes the following:
➜ ~ offlineimap -c ~/testofflineimaprc -u machineui -q
OfflineIMAP 6.5.5
Licensed under the GNU GPL v2+ (v2 or any later version)
msg:protocol:MainThread7.0.0
msg:initbanner:MainThreadOfflineIMAP+6.5.5%0A++Licensed+under+the+GNU+GPL+v2%2B+%28v2+or+any+later+version%29
msg:registerthread:Account sync personalpersonal
msg:acct:Account sync personalpersonal
msg:connecting:Account sync personalimap.gmail.com%0A993
msg:syncfolders:Account sync personalIMAP%0AMaildir
msg:registerthread:Folder INBOX [acc: personal]personal
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 851, in emit
msg = self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 724, in format
return fmt.format(record)
File "/home/spang/src/mirrors/offlineimap/offlineimap/ui/Machine.py", line 34, in format
return line + urlencode([('', record.mesg)])[1:]
AttributeError: 'LogRecord' object has no attribute 'mesg'
Logged from file UIBase.py, line 318
msg:threadExited:MainThreadFolder+INBOX+%5Bacc%3A+personal%5D
msg:unregisterthread:MainThreadFolder+INBOX+%5Bacc%3A+personal%5D
msg:acctdone:Account sync personalpersonal
msg:threadExited:MainThreadAccount+sync+personal
msg:unregisterthread:MainThreadAccount+sync+personal
msg:terminate:MainThread0%0A%0A