Commit graph

172 commits

Author SHA1 Message Date
Romain Bignon
b110f10c9e if backend name is already taken, suggest the first available one with the same base 2015-04-04 12:52:19 +02:00
Kitof
7155539965 Add module_name param in add_backend to allow command line interaction 2015-04-04 12:32:57 +02:00
Romain Bignon
2afd27b4a4 use StateBrowser, s/BrowserToBeContinued/BrowserQuestion/ and coding style fixes 2015-03-08 16:31:36 +01:00
Baptiste Delpey
3a05b29bc3 add BrowserToBeContinued exception and handle it 2015-03-08 14:21:23 +01:00
Romain Bignon
47232308a9 prompt user to accept an untrusted keyring (closes #771) 2015-01-16 12:21:51 +01:00
Romain Bignon
faf40c9c1f as BrowserSSLError now inherits from BrowserUnavailable, change exception catching to handle it (refs #1702) 2015-01-08 10:46:03 +01:00
Florent Fourcot
76da33368f Encode properly output in console.py (fix #1673) 2014-12-31 18:15:48 +01:00
Laurent Bachelier
21e8f82fd7 pep8: Use "X not in Y" instead of "not X in Y"
flake8 --select E713, semi-manual fixing
2014-10-11 01:27:24 +02:00
Laurent Bachelier
6161a0aacd pep8 fixes, modernizations
autopep8 -a -r -i --select E711,E712,W601,W602,W603,W604,W690,E304,E401,E502 .
Also includes some manual reindentations (many are left after the print()
changes).
Manually checked, some modernizations not commited here.
2014-10-10 23:41:43 +02:00
Laurent Bachelier
7be9a6468b logging: Create a new level DEBUG_FILTERS
This is a cleaner approach that requires less configuration
in other applications.
This also easily allows us to have another color.

Many checks were made on being exactly at the DEBUG level, they were
fixed to also check on being below DEBUG (i.e. DEBUG_FILTERS).
2014-10-07 17:11:09 +02:00
Romain Bignon
5bd70c564f os.isatty is now forbidden (as stream.fileno() is not implemented by StringIO)
Use stream.isatty() instead.
2014-10-07 09:39:12 +02:00
Romain Bignon
d61e15cf84 rename things related to browsers
weboob.tools.browser -> weboob.deprecated.browser
weboob.tools.parsers -> weboob.deprecated.browser.parsers
weboob.tools.mech -> weboob.deprecated.mech
weboob.browser2 -> weboob.browser
weboob.core.exceptions -> weboob.exceptions

Also, the new tree for browser2 is:

weboob.browser: import weboob.browser.browsers.* and weboob.browser.url.*
weboob.browser.browsers: all browsers (including PagesBrowser and LoginBrowser)
weboob.browser.url: the URL class
weboob.browser.profiles: all Profile classes
weboob.browser.sessions: WeboobSession and FuturesSession
weboob.browser.cookies: that's a cookies thing
weboob.browser.pages: all Page and derivated classes, and Form class
weboob.browser.exceptions: specific browser exceptions
weboob.browser.elements: AbstractElement classes, and 'method' decorator
weboob.browser.filters.*: all filters
2014-10-07 00:30:07 +02:00
Florent
9949bbf919 Move exceptions to weboob.core.exceptions 2014-10-02 11:04:14 +02:00
Florent
a64c9f2edb Rename BaseApplication to Application 2014-09-26 10:18:12 +02:00
Laurent Bachelier
e9c047ce93 applications: Define std* in the proper class
This would make weboob-debug unusable, for example.
2014-09-18 12:49:26 +02:00
Romain Bignon
a4c1acd2f0 fix regression introduced by 19a95dc0d6 2014-09-06 11:08:43 +02:00
Laurent Bachelier
c07e23cafc Use class attributes as much as possible for application output
refs #803
2014-09-04 12:41:25 +02:00
Laurent Bachelier
19a95dc0d6 Centralize encoding guesses, default to UTF-8
This might not be enough for print() and could need a locale.setlocale()
even though it is generally discouraged.

closes #1352
2014-09-04 12:41:25 +02:00
Florent
d9730033bb Allows shortcuts for modules. Related to #881 2014-09-02 15:36:59 +02:00
Florent
322616b9e3 Add the default value displayed "upper" in aliases Closes #1319 2014-09-02 12:45:49 +02:00
Florent
e12485dc84 Introduce local exception for SSL errors
It removes the import of SSL in console applications (SSL -> socket ->
base64 -> ...)
2014-07-09 11:45:55 +02:00
Florent
8a2a1ece5e Do not always import module used only in debug mode 2014-07-09 10:23:24 +02:00
Romain Bignon
e025fb0b20 rename ICap to Cap (closes #1424) 2014-07-05 17:33:44 +02:00
Romain Bignon
5a6cdce345 fix unicode issues for values loaded from 'backends' config file 2014-05-19 09:20:34 +02:00
Romain Bignon
6fcac89dd5 first step in python3 support 2014-05-17 14:27:55 +02:00
Romain Bignon
7c1e08eb96 move browser exceptions into weboob.tools.exceptions 2014-05-17 14:27:55 +02:00
Romain Bignon
8955815805 better display to prompt user passwords 2014-02-24 14:55:06 +01:00
Romain Bignon
44da8924bf use name of module, not of backend 2014-02-09 19:09:39 +01:00
Florent
562062ac85 Display backend@issues.weboob.org and not backend.EMAIL 2014-02-09 14:32:31 +01:00
Vincent Paredes
56310adcad fixing password encoding issue
Signed-off-by: Romain Bignon <romain@budget-insight.com>
2014-02-05 18:22:48 +01:00
Romain Bignon
829ecf8305 fix: masked parameter wasn't considered 2014-01-31 17:13:58 +01:00
Romain Bignon
43022f434a cleaned fix 2014-01-26 15:32:37 +01:00
Romain Bignon
478e85a2d8 better detection of editor used 2014-01-26 14:59:00 +01:00
Romain Bignon
b36daee5b1 prompt (beautifully) user during configuration of a backend 2014-01-24 00:39:43 +01:00
Romain Bignon
2b0d4e8b91 create/edit tickets in a text editor 2014-01-22 00:00:43 +01:00
Laurent Bachelier
e78714b560 Reuse termcolor's environment variable to disable colors 2013-08-03 01:19:05 +02:00
Florent
df2a804de6 s/count parameter/count command/ 2013-07-30 10:57:11 +02:00
Florent
22c963b8ff Improves hint message 2013-07-30 10:47:23 +02:00
Romain Bignon
46d9acd37e display a message when more results are available (closes #1038) 2013-07-27 23:40:24 +02:00
Romain Bignon
de45700a49 automatically create a storage if STORAGE class attribute is not empty 2013-07-27 21:35:02 +02:00
Romain Bignon
9d46a62d6c do not output bold at all when stdout is not a tty 2013-07-27 17:20:48 +02:00
Laurent Bachelier
a6ad7e83ff Use newer form of catching exceptions
autopep8 -i --select=W602
Also some other minor deprecated syntax changes, like "while 1".
I did not commit the less obvious changes.
2013-07-27 15:16:16 +02:00
Romain Bignon
c0740e695d remove useless import of with_statement (we do not support anymore python2.5)
refs #806
2013-07-27 14:38:18 +02:00
Laurent Bachelier
c8b013be53 Better handling of "tiny" choices, allow forcing 2013-07-19 19:25:38 +02:00
Romain Bignon
9731ae1b91 weboob-config edit: fix error if there are private attributes on backend
(for example _enabled or _proxy)
2013-04-10 17:40:23 +02:00
Laurent Bachelier
7094931c92 Easy spacing fixes, trailing stuff
Remove useless trailing \
Remove trailing spaces
Add missing empty lines

autopep8 -ir -j2 --select=E301,E302,E502,W291,W293,W391 .

Diff quickly checked.
2013-03-16 00:54:55 +01:00
Florent
3296d57132 Remove useless TODO 2013-02-07 15:49:33 +01:00
Romain Bignon
47887d5560 add handler in applications 2012-11-10 13:25:07 +01:00
Laurent Bachelier
571db865ab Simpler acquire_input()
Might work with Python 2.5 as a side-effect of not using delete.
2012-10-21 18:02:06 +02:00
Romain Bignon
bf3206418b display a custom bold warning on SSLError 2012-09-01 13:37:18 +02:00