Merge lp:~brathod-serpentcs/openobject-addons/smtpclient-correction-SerpentCS into lp:openobject-addons/extra-6.0

Proposed by Bipin Rathod(SerpentCS)
Status: Merged
Approved by: Serpent Consulting Services
Approved revision: 5701
Merged at revision: 5701
Proposed branch: lp:~brathod-serpentcs/openobject-addons/smtpclient-correction-SerpentCS
Merge into: lp:openobject-addons/extra-6.0
Diff against target: 23 lines (+10/-3)
1 file modified
smtpclient/smtpclient.py (+10/-3)
To merge this branch: bzr merge lp:~brathod-serpentcs/openobject-addons/smtpclient-correction-SerpentCS
Reviewer Review Type Date Requested Status
Serpent Consulting Services Approve
Review via email: mp+94347@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Serpent Consulting Services (serpent-consulting-services) wrote :

Bipin,

Thanks for the merge, but I would like to remove line 15.

Thanks.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'smtpclient/smtpclient.py'
2--- smtpclient/smtpclient.py 2010-07-06 05:41:03 +0000
3+++ smtpclient/smtpclient.py 2012-02-23 11:15:28 +0000
4@@ -157,9 +157,16 @@
5 def read(self,cr, uid, ids, fields=None, context=None, load='_classic_read'):
6 def override_password(o):
7 if len(o) > 0:
8- for field in o[0]:
9- if field == 'password':
10- o[0][field] = '********'
11+ if not isinstance(o,list):
12+ if o.get('password',False):
13+ o['password'] = '********'
14+ else:
15+ '''Modified code:::::::::::::'''
16+ for rec in o:
17+ for field in rec.keys():
18+ if field == 'password':
19+ rec[field] = '********'
20+
21 return o
22
23 result = super(smtpclient, self).read(cr, uid, ids, fields, context, load)