Skip to content

Commit

Permalink
do not use self.__dict__
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sobolev committed Jan 23, 2015
1 parent ae296c0 commit e2c89fa
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions master/buildbot/steps/http.py
Expand Up @@ -79,9 +79,8 @@ def __init__(self, url, method, **kwargs):
self.method = method
self.url = url

for p in HTTPStep.requestsParams:
v = kwargs.pop(p, None)
self.__dict__[p] = v
for param in HTTPStep.requestsParams:
setattr(self, param, kwargs.pop(param, None))

BuildStep.__init__(self, **kwargs)

Expand All @@ -99,10 +98,10 @@ def doRequest(self):
'url': self.url
}

for p in self.__dict__ and self.requestsParams:
v = self.__dict__[p]
if v is not None:
requestkwargs[p] = v
for param in self.requestsParams:
value = getattr(self, param, None)
if value is not None:
requestkwargs[param] = value

log = self.addLog('log')

Expand Down

0 comments on commit e2c89fa

Please sign in to comment.