Commit graph

132 commits

Author SHA1 Message Date
Laurent Bachelier
30ca21c5d8 Use the right default value for XDG_DATA_DIRS
http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
2012-03-15 18:51:18 +01:00
Romain Bignon
8e391d0b88 bump to 0.c 2012-03-14 22:09:24 +01: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
Laurent Bachelier
1a5ece25df Collections are now base objects
So no need for this check anymore.

refs #774 and reverts a change of 9c5326c0
2012-03-13 22:08:45 +01:00
Romain Bignon
a51219a192 add_backend: do not crash if params is None 2012-03-03 23:19:58 +01:00
Olivier Schwander
825dc0b5b1 Fix path building for config dir and data dir
The paths are now correctly built in the case where $XDG_DATA_HOME and
$XDG_CONFIG_HOME are not empty: the "weboob/" suffix was in the fallback
argument of the os.get.environ.

Signed-off-by: Olivier Schwander <olivier.schwander@ens-lyon.org>
Signed-off-by: Romain Bignon <romain@symlink.me>
2012-02-17 13:21:19 +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
Laurent Bachelier
9c5326c0e4 Make CapCollection a bit more useable
Collections are not stored in replapplication.objects anymore, but in
replapplication.collections. This fixes the IDs issue. There was no gain
from storing them in objects.

Completion right after cd should be faster (and should always have been
like that, it was pretty much a bug).

The display of do_ls() should be much clearer. Collections are always at
the end, have ids/title/backend like objects (but using a formatter
would be better than my current hack).

There are still many issues with the current implementation.
refs #774
closes #785
2012-02-12 15:49: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
4be4b40509 bump to 0.b 2012-02-05 19:35:30 +01:00
Romain Bignon
a94d6c9972 check module version when loading it 2012-02-05 17:08: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
f7a35c7ea8 add a method Weboob.load_backend() 2012-02-01 23:06:00 +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
Romain Bignon
65497fe91b calculate mtime of a module recursively 2012-01-28 14:15:30 +01:00
Romain Bignon
6f9a0215eb Revert "repositories/ is a config directory"
This reverts commit 70bdde2657.
2012-01-28 13:48:10 +01:00
Romain Bignon
70bdde2657 repositories/ is a config directory 2012-01-28 11:45:29 +01:00
Laurent Bachelier
a3b75fc2bb Use the correct location for sources.list
It was moved to the right directory, but Repositories tries to find it
in the datadir, not in the workdir.
2012-01-27 23:37:08 +01:00
Laurent Bachelier
adb7b95796 Fix to still use with keyword with Python 2.6
Also add imports for Python 2.6 usage.
2012-01-27 23:14:44 +01:00
Romain Bignon
7d3a717722 correctly remove the old .weboob directory 2012-01-27 17:41:11 +01:00
Romain Bignon
3a3bbd377e support XDG Base Directory Specification (closes #765) 2012-01-27 17:34:08 +01:00
Romain Bignon
65169a8a8d fix compatibility with python2.6 2012-01-21 16:46:33 +01:00
Romain Bignon
c0655ad9ef update sources.list comments 2012-01-21 16:24:35 +01:00
Romain Bignon
f28fac3a27 oops, fix crash (closes #764) 2012-01-20 13:58:19 +01:00
Romain Bignon
b3c797978a automatically install missing modules referenced in ~/.weboob/backends 2012-01-19 10:48:26 +01:00
Romain Bignon
5083103d1a fix messages 2012-01-18 11:45:47 +01:00
Laurent Bachelier
55465a2e4c Display the proper config file path 2012-01-18 00:42:19 +01:00
Romain Bignon
9d87c8bc37 "weboob-config update" installs missing modules referenced in ~/.weboob/backends 2012-01-17 17:59:03 +01:00
Romain Bignon
14a7a1d362 support repositories to manage backends (closes #747) 2012-01-17 17:00:05 +01:00
Romain Bignon
c26f7170bc remove unused import 2011-06-21 13:20:41 +02:00
Romain Bignon
2316872c0c more generic test in creation of config file (closes #556) 2011-06-21 12:48:40 +02:00
Romain Bignon
cb1372b99f new class BackendConfig to manage backend configs 2011-05-21 10:26:57 +02:00
Romain Bignon
be2be4af9c add a callbacks system 2011-05-21 10:26:31 +02:00
Romain Bignon
7ab8202660 unused import 2011-05-03 16:55:22 +02:00