Merge lp:~mandel/ubuntuone-client/fix-logging into lp:ubuntuone-client

Proposed by Manuel de la Peña
Status: Merged
Approved by: Roberto Alsina
Approved revision: 1300
Merged at revision: 1301
Proposed branch: lp:~mandel/ubuntuone-client/fix-logging
Merge into: lp:ubuntuone-client
Diff against target: 24 lines (+2/-1)
2 files modified
ubuntuone/syncdaemon/logger.py (+1/-0)
ubuntuone/syncdaemon/sync.py (+1/-1)
To merge this branch: bzr merge lp:~mandel/ubuntuone-client/fix-logging
Reviewer Review Type Date Requested Status
Roberto Alsina (community) Approve
Review via email: mp+121825@code.launchpad.net

Commit message

- Fix logging by escaping % (LP: #1043183).

Description of the change

- Fix logging by escaping % (LP: #1043183).

To post a comment you must log in.
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :

Voting does not meet specified criteria. Required: Approve >= 1, Disapprove == 0, Needs Fixing == 0, Needs Information == 0, Resubmit == 0, Pending == 0. Got: 1 Pending.

Revision history for this message
Roberto Alsina (ralsina) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ubuntuone/syncdaemon/logger.py'
2--- ubuntuone/syncdaemon/logger.py 2012-06-21 18:58:50 +0000
3+++ ubuntuone/syncdaemon/logger.py 2012-08-29 10:53:51 +0000
4@@ -75,6 +75,7 @@
5
6 desc = "%-28s share:%-40r node:%-40r %s(%s) " % (_method, _share,
7 _uid, _method, args)
8+ desc = desc.replace('%', '%%')
9 self.zipped_desc = zlib.compress(desc, 9)
10 self.logger = _logger
11
12
13=== modified file 'ubuntuone/syncdaemon/sync.py'
14--- ubuntuone/syncdaemon/sync.py 2012-06-13 21:31:24 +0000
15+++ ubuntuone/syncdaemon/sync.py 2012-08-29 10:53:51 +0000
16@@ -271,7 +271,7 @@
17 path = self.key.safe_get('path')
18 extra = dict(message=message,
19 mdid=self.key.safe_get("mdid"),
20- path=path,
21+ path=path.replace('%', '%%'), # escape %
22 share_id=self.key.safe_get("share_id") or 'root',
23 node_id=self.key.safe_get("node_id"),
24 hasmd=self.key.has_metadata(),

Subscribers

People subscribed via source and target branches