use StateBrowser, s/BrowserToBeContinued/BrowserQuestion/ and coding style fixes

This commit is contained in:
Romain Bignon 2015-03-08 11:02:23 +01:00
commit 2afd27b4a4
5 changed files with 64 additions and 77 deletions

View file

@ -17,7 +17,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with weboob. If not, see <http://www.gnu.org/licenses/>.
from weboob.tools.value import Value
class BrowserIncorrectPassword(Exception):
pass
@ -39,11 +39,12 @@ class BrowserUnavailable(Exception):
pass
class BrowserToBeContinued(BrowserUnavailable):
def __init__(self, *args):
self.fields = []
for arg in args:
self.fields.append(Value(label=arg))
class BrowserQuestion(BrowserIncorrectPassword):
"""
When raised by a browser,
"""
def __init__(self, *fields):
self.fields = fields
class BrowserHTTPNotFound(BrowserUnavailable):