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
448c06d125
pep8 blank lines fixes
...
flake8 --select W391,E302,E301,E304
autopep8 can't fix W391 even though it claims it can.
Fixed using a simple custom script.
2014-10-10 23:41:44 +02:00
Romain Bignon
a2a9db4f09
create PrintProgress class instead of using IProgress as default one
2014-10-08 17:10:13 +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
a019819f9d
Move browser2 from weboob/tools/b2 to weboob/browser2
2014-10-02 11:01:34 +02:00
Florent
0088013ae1
Rename BaseBrowser to Browser
2014-09-26 10:18:12 +02:00
Florent
5a1d83b567
Rename BaseModule to Module and Module to LoadedModule
2014-09-26 10:18:12 +02:00
Laurent Bachelier
a4162e46e6
repositories: Catch the proper exception for missing icon
2014-09-04 23:37:16 +02:00
Florent
0e3e32adb1
Do not import exceptions of requests / load browser if needed
...
The import process of requests is very expensive: it imports all urllib,
and a lot of stuff. It is a problem on slow hardware, for applications
not running browser2 (example: weboob-config update).
This patch has two mains parts:
* introduces load_browser to load a browser only if needed (a lot of repository
processing does not need a browser)
* Do not import exceptions of requests, but use Weboob internals one
Before: 6455 open/190 modules imported
After: 3997 open/112 modules
2014-07-09 10:54:33 +02:00
Romain Bignon
09acbfde5e
use ConfigParser in priority with python2
2014-06-10 17:02:15 +02:00
Laurent Bachelier
fb011f2be6
repositories: Fix HTTP error handling for browser2
2014-05-20 00:02:55 +02:00
Romain Bignon
62b8ca70c6
sorry Olf, I've in fact broken weboob-repos
2014-05-17 15:07:56 +02:00
Romain Bignon
6fcac89dd5
first step in python3 support
2014-05-17 14:27:55 +02:00
Laurent Bachelier
ca04fb80ca
Do not crash when repository is invalid
...
closes #1281
2013-08-03 13:05:14 +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
Florent
fc3eefff09
Check if repositories are ok at the application runtime
...
Closes #1072
2013-03-22 18:01:32 +01:00
Florent
c6816e7444
Other comments
2013-03-20 14:50:09 +01:00
Florent
e56737a0cd
Fix comment
2013-03-20 14:10:40 +01:00
Laurent Bachelier
c21d1f7925
Code clarity fixes
...
autopep8 -ir -j2 --select=E303,E125
Diff checked manually.
2013-03-16 00:52:43 +01:00
Laurent Bachelier
5b12a3c17e
Force updating modules after upgrade
...
fixes #1066
Also, some small PEP8 fixes.
2013-03-09 15:14:46 +01:00
Romain Bignon
24cbeb47e5
major language fix (courtesy of Pascal Jakobs)
2012-11-10 14:37:45 +01:00
Romain Bignon
ba1879d501
use imp instead of __import__
2012-05-07 14:03:21 +02:00
Florent
40de9b2d00
Fix indentation
2012-04-26 12:14:47 +02:00
Romain Bignon
b4154b5843
move part of update() to update_repositories()
2012-04-25 12:40:33 +02:00
Laurent Bachelier
c92ec6768b
Fix keyring updates with latest openurl() change
...
You now have to call read() before doing another openurl().
As a bonus, the code is slightly shorter.
2012-04-15 20:31:56 +02:00
Laurent Bachelier
db6a912db5
repositories: Some systems only have gpgv2
...
fixes #837
2012-04-10 07:26:22 +02:00
Romain Bignon
9f86437ea1
do not check anymore if all CapBaseObject have docstrings
2012-03-26 14:41:24 +02:00
Laurent Bachelier
006e97a8be
PEP8 style fixes and other small style fixes
...
I used autopep8 on some files and did carefully check the changes.
I ignored E501,E302,E231,E225,E222,E221,E241,E203 in my search, and at
least E501 on any autopep8 run.
Other style fixes not related to PEP8:
* Only use new-style classes. I don't think the usage of old-style
classes was voluntary. Old-style classes are removed in Python 3.
* Convert an if/else to a one-liner in mediawiki, change docstring style
change to a comment something that wasn't really appropriate for a
docstring.
* Unneeded first if condition in meteofrance
2012-03-14 04:51:46 +01:00
Romain Bignon
a93daefb4a
improve messages
2012-02-16 00:01:19 +01:00
Romain Bignon
64c0698266
do not store 'None' in repository's config
2012-02-15 23:43:08 +01:00
Romain Bignon
d6534ae845
fix: retrieve third icons even if module is local
2012-02-11 16:19:22 +01:00
Romain Bignon
822bd8c59d
use "weboob/VERSION" as user-agent to download files on repositories
2012-02-06 18:20:49 +01:00
Romain Bignon
d248196bb1
remove nsfw from example config
2012-02-03 23:52:02 +01:00
Romain Bignon
92c8873369
remove duplicate capabilities
2012-02-03 19:56:31 +01:00
Romain Bignon
59b4e78f65
add IProgress.error() to allow application to handle errors
2012-02-02 17:17:57 +01:00
Romain Bignon
33d7a8d466
fetch icons asynchronously ( closes #756 )
2012-02-02 15:36:36 +01:00
Romain Bignon
876535ff90
improve error message when a module isn't loadable
2012-02-01 23:07:25 +01:00
Romain Bignon
8c6fe811fe
fix order of loaded repositories
2012-02-01 08:33:59 +01:00
Laurent Bachelier
8c50324dbf
Don't remove the module if the signature is invalid
...
Remove it only just before extraction
2012-01-30 15:48:28 +01:00
Romain Bignon
97ef1f4e8c
little improvements
2012-01-30 15:28:05 +01:00
Laurent Bachelier
307ccbc36c
Display keyring version and hash
...
So that the user can easily check it is legit through another channel.
2012-01-30 11:10:10 +01:00
Laurent Bachelier
9da69d34bd
Check the packages are valid at install
2012-01-30 01:21:01 +01:00
Laurent Bachelier
f3d962b19a
Retrieve the keyring, and check its updates are valid
2012-01-30 01:20:57 +01:00
Laurent Bachelier
dd60e65174
Add support for generating a keyring
2012-01-29 16:50:23 +01:00
Laurent Bachelier
22fec7f9e6
Reinstall the module if its directory was deleted
...
Useful for stupid users (like me) who delete the directory.
2012-01-29 15:56:35 +01:00
Laurent Bachelier
764bfd18ec
Precompile module directory at install
2012-01-29 15:56:35 +01:00
Laurent Bachelier
bcec326f35
Remove the whole module directory before updating
...
So that deleted/renamed files upstream are actually deleted.
Also check that the proper module directory was created after extraction.
2012-01-29 15:56:35 +01:00
Laurent Bachelier
863a32b96e
Small enhancements to mtime handling
...
* Use directories mtime (so deleted or renamed files are taken into account)
* Set the tarfile mtime close to the version
2012-01-29 15:56:35 +01:00