81 Commits

Author SHA1 Message Date
Calum Lind
11c6e387d5 [#2510] Fix config type checking 2014-09-28 10:33:21 +01:00
Calum Lind
5167e93d12 Flake8 core and common files
* Added N802 to flake8 ignore as certain inherited funcs cannot be changed
   to lowercase and this unresolved warning hides other errors/warnings.
 * Include new header
2014-09-03 23:48:34 +01:00
Calum Lind
b5dcfc6f9e Sort/prettify imports with isort 2014-09-03 18:27:32 +01:00
Calum Lind
1e6c811768 [Python-Modernize] lib2to3.fixes.fix_except
* Use 'ex' instead of 'e' to conform with pylint
 * Minimal Flake8 on some files
2014-09-03 17:22:38 +01:00
Calum Lind
95f859673e [Python-Modernize] lib2to3.fixes.fix_has_key 2014-09-03 17:22:38 +01:00
Calum Lind
7b53486821 Use stdlib json
Some flake8 changes and DEPENDS tidyup
2014-07-19 11:32:17 +01:00
Calum Lind
9290cc1f7a Fix building the code documentation with sphinx
Updated Sphinx conf and tested with Sphinx 1.2.1
Moved webui gen_gettext script
Fixed docstring warning in code
Renamed console update-tracker to update_tracker
2014-02-20 17:38:51 +00:00
Calum Lind
14a55133af [#2219] Update the UIs for single Proxy and I2P Proxy 2014-02-17 01:38:02 +00:00
bendikro
d91a9504aa Fix bug introduced in 19234d 2013-05-27 23:39:43 +02:00
bendikro
19234d6565 Added some tests for rpcserver 2013-05-26 23:09:02 +01:00
Calum Lind
2c4ef9dbb3 Fixup saving and loading state files
* All state files have a backup created before saving
 * The backup will now be used if saving or loading fails
 * GTKUI state files stored in new gtkui_state dir and common load/save functions created
 * Detects bad shutdown and archives timestamped state files in separate config directory.
2013-05-22 01:25:25 +01:00
Calum Lind
b6a3161280 Add a get method to config so a default value can be returned 2013-05-09 19:13:20 +01:00
Calum Lind
a50c83c284 Modify log message from Error to Warning level 2011-11-29 19:02:20 +00:00
Calum Lind
c29d3bb930 Fix #1967 : IndexError when trying to open a non-json conf file 2011-11-29 18:55:30 +00:00
Pedro Algarvio
233e814547 Late import twisted's reactor, it allows the gtk reactor to be proper installed. 2011-04-22 11:33:45 +01:00
Pedro Algarvio
1a6742b1e2 Keep consistency on deluge.config. 2011-04-22 11:26:09 +01:00
Pedro Algarvio
154688a3e2 Implement __delitem__ on deluge.config.Config. 2011-04-22 11:26:09 +01:00
Pedro Algarvio
2fa8ca6753 Merge branch 'master' into improved-logging
Conflicts:
	ChangeLog
	deluge/plugins/autoadd/autoadd/gtkui.py
	deluge/ui/client.py
2010-12-13 12:31:20 +00:00
Pedro Algarvio
3b00a7de59 Swhiched the old style logging, ie, a single logger for all logging output to several loggers. This brings the ability to tweak the logging levels for each of the loggers, ie, we can have the "deluge" logger be at the ERROR level while having "deluge.core" at the DEBUG level, meaning we will only see log message for all of the deluge loggers above the ERROR level while still having all messages above the DEBUG level for the "deluge.core" logger and it's children. This kind of tweak can be achieved by adding a file named "logging.conf" to deluge's config dir and this is explained on the deluge.log.tweak_logging_levels function.
Passing `-r` to the cli's while also passing `-l` will make the logfile rotate when reaching 5Mb in size. Three backups will be kept at all times.
All deluge's code is now using this new style logging along with the git hosted plugins. For other plugins not hosted by deluge, which still imports `LOG` as the logger, a deprecation warning will be shown explaining the required changes needed to use the new style logging. New plugins created by the `create_plugin` script will use the new logging facilities.
2010-12-06 11:20:22 +00:00
Damien Churchill
14ec9464aa fix a bug that can occur when upgrading 1.1 config files 2010-12-01 10:21:26 +00:00
Andrew Resch
45940b9064 Fix #1373 use of cyrllic paths 2010-10-16 12:56:00 -07:00
John Garland
f1f6f137c3 Make sure config value strings are utf8 encoded (fixes #1369) 2010-10-03 18:33:57 +11:00
Andrew Resch
db9b5580d7 Fix issue where the save_timer is cancelled when it's not active 2010-08-21 12:53:21 -07:00
Andrew Resch
01773e433f Fix #1341 issue where Config would try to cancel the save_timer when it is None. 2010-08-18 12:33:09 -07:00
Damien Churchill
708ad2e665 add a __contains__ method to the config class
fix upgrading old configs when the key doesn't exist in the old config
2010-01-20 21:04:40 +00:00
Andrew Resch
ac9be780cf Revert 5619
Fix find_json_objects when there is a newline at the end of the string
Add test for find_json_objects
2009-08-03 20:27:03 +00:00
Damien Churchill
5f561dabda fix a bug in the Config class relating to the config directory 2009-08-03 19:49:47 +00:00
Damien Churchill
e496fda499 fix for when there isn't a save timer yet 2009-08-03 19:04:54 +00:00
Andrew Resch
704435f721 Config copies the defaults dict now since it is mutable
Fix saving with the save_timer after setting an item
Add test for testing the save timer
2009-08-03 18:43:05 +00:00
Andrew Resch
e8b04c1542 Add a test for saving the config 2009-08-03 17:39:12 +00:00
Andrew Resch
ded6bb9566 Change the config format
Add test_config
2009-08-01 02:26:26 +00:00
Andrew Resch
b3a3b9e4f1 Fix loading old configs with version numbers 2009-07-06 06:38:06 +00:00
Andrew Resch
1b997b2349 The default format version and file version should be 1 2009-07-05 17:42:36 +00:00
Andrew Resch
e36ca0e5ba Fix calling set functions 2009-06-10 22:43:43 +00:00
Andrew Resch
7ddb5db6ed Fix the set functions so that you are able to register more than one per config key
Likewise for the config change callbacks
2009-06-10 18:15:52 +00:00
John Garland
227e464b63 Fixed typo in seeking. 2009-06-10 14:28:37 +00:00
Andrew Resch
1091054b38 Add ability to run individual set functions 2009-06-02 00:56:05 +00:00
Andrew Resch
30efe143fe Catch exception when trying to open config file 2009-05-30 01:32:25 +00:00
Andrew Resch
63f1874ae8 Modify the Config class to version the config files now.
Add ability to register converter functions for config files to convert them to newer versions.
2009-05-28 23:43:45 +00:00
Andrew Resch
d67477f6e2 Add OpenSSL exception to all GPL headers 2009-05-18 21:51:49 +00:00
Damien Churchill
2766c103e2 change the config class to return true or false on a save to show whether or not it was successful 2009-05-07 15:32:21 +00:00
Damien Churchill
c59857b802 add config_file as a property to the Config class 2009-05-07 15:09:13 +00:00
Andrew Resch
df00d28af4 Remove unused variable 2009-04-18 18:53:16 +00:00
Andrew Resch
86d52ba2e1 Use binary mode on all config files for Windows compat 2009-03-12 21:43:17 +00:00
Andrew Resch
d63c187dcf Fix loading config files on Windows 2009-03-12 21:33:43 +00:00
Andrew Resch
344446a626 Do not return when unable to make a backup of the config file 2009-03-09 16:43:28 +00:00
Andrew Resch
9a4bbb771e Make a backup of config files before overwriting and make sure the file is fsync'd without error 2009-03-08 02:33:12 +00:00
Damien Churchill
70a810b531 do safe simplejson import in common and use this imported copy in the 2
other places where its used.
2009-02-19 09:39:18 +00:00
Damien Churchill
c720417cb4 change config file format from pickle to json 2009-02-10 22:43:35 +00:00
Andrew Resch
3b6bee1508 Fix up config module to use twisted loop instead of gobject 2009-02-04 02:47:02 +00:00