Merge lp:~mvo/weblive/new-pep8-client into lp:weblive

Proposed by Michael Vogt
Status: Needs review
Proposed branch: lp:~mvo/weblive/new-pep8-client
Merge into: lp:weblive
Prerequisite: lp:~elachuni/weblive/pep8-client
Diff against target: 56 lines (+6/-6)
1 file modified
client/weblive.py (+6/-6)
To merge this branch: bzr merge lp:~mvo/weblive/new-pep8-client
Reviewer Review Type Date Requested Status
Registry Administrators Pending
Review via email: mp+118561@code.launchpad.net

Description of the change

This fixes some pep8 issues that the quantal version of pep8 complains about. It builds on top of lp:~elachuni/weblive/pep8-client

To post a comment you must log in.

Unmerged revisions

160. By Michael Vogt

use isinstance instead of comparing types as suggested by the quantal pep8 checker

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'client/weblive.py'
--- client/weblive.py 2012-08-07 13:38:45 +0000
+++ client/weblive.py 2012-08-07 13:38:45 +0000
@@ -118,7 +118,7 @@
118 query['locale'] = locale118 query['locale'] = locale
119 reply = self.do_query(query)119 reply = self.do_query(query)
120120
121 if type(reply['message']) != type([]):121 if not isinstance(reply['message'], []):
122 if reply['message'] == 1:122 if reply['message'] == 1:
123 raise WebLiveError("Reached user limit, return false.")123 raise WebLiveError("Reached user limit, return false.")
124 elif reply['message'] == 2:124 elif reply['message'] == 2:
@@ -145,7 +145,7 @@
145 query['action'] = 'list_everything'145 query['action'] = 'list_everything'
146 reply = self.do_query(query)146 reply = self.do_query(query)
147147
148 if type(reply['message']) != type({}):148 if not isinstance(reply['message'], {}):
149 raise WebLiveError("Invalid value, expected '%s' and got '%s'."149 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
150 % (type({}), type(reply['message'])))150 % (type({}), type(reply['message'])))
151151
@@ -173,7 +173,7 @@
173 query['serverid'] = serverid173 query['serverid'] = serverid
174 reply = self.do_query(query)174 reply = self.do_query(query)
175175
176 if type(reply['message']) != type([]):176 if not isinstance(reply['message'], []):
177 raise WebLiveError("Invalid value, expected '%s' and got '%s'."177 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
178 % (type({}), type(reply['message'])))178 % (type({}), type(reply['message'])))
179179
@@ -187,7 +187,7 @@
187 query['action'] = 'list_package_blacklist'187 query['action'] = 'list_package_blacklist'
188 reply = self.do_query(query)188 reply = self.do_query(query)
189189
190 if type(reply['message']) != type([]):190 if not isinstance(reply['message'], []):
191 raise WebLiveError("Invalid value, expected '%s' and got '%s'."191 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
192 % (type({}), type(reply['message'])))192 % (type({}), type(reply['message'])))
193193
@@ -202,7 +202,7 @@
202 query['serverid'] = serverid202 query['serverid'] = serverid
203 reply = self.do_query(query)203 reply = self.do_query(query)
204204
205 if type(reply['message']) != type([]):205 if not isinstance(reply['message'], []):
206 raise WebLiveError("Invalid value, expected '%s' and got '%s'."206 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
207 % (type({}), type(reply['message'])))207 % (type({}), type(reply['message'])))
208208
@@ -216,7 +216,7 @@
216 query['action'] = 'list_servers'216 query['action'] = 'list_servers'
217 reply = self.do_query(query)217 reply = self.do_query(query)
218218
219 if type(reply['message']) != type({}):219 if isinstance(reply['message'], {}):
220 raise WebLiveError("Invalid value, expected '%s' and got '%s'."220 raise WebLiveError("Invalid value, expected '%s' and got '%s'."
221 % (type({}), type(reply['message'])))221 % (type({}), type(reply['message'])))
222222

Subscribers

People subscribed via source and target branches

to all changes: