Commit Graph

8450 Commits

Author SHA1 Message Date
bendikro edf616baca [#2805] Fix: Standalone mode not detecting local running daemon 2016-04-21 12:39:31 +02:00
bendikro 58bc8b6ec7 [#2808] Fix: Deluge Log File Not Working as Intended 2016-04-20 14:09:50 +02:00
bendikro 2dea6ab5a5 [Tests] Add pylint target to tox 2016-04-19 22:14:28 +02:00
bendikro c3247396f7 [Stats] Fix to tests and deleted .test.py 2016-04-19 19:00:07 +02:00
bendikro f3bfe177ce [GTKUI] Fix gtk warning on shutdown 2016-04-19 12:05:03 +01:00
Calum Lind 7c1f39d10e [Core] Minor change to magnet info_hash fix 2016-04-19 10:50:05 +01:00
Calum Lind cd6669c024 [#2790] Ensure base32 magnet hash is uppercase 2016-04-19 10:44:55 +01:00
bendikro 5c69b56cd5 [Core] Fix adding magnets failing 2016-04-19 10:43:59 +01:00
Calum Lind 90d1bbbb31 [Lint] Fix pylint issues uncovered by recent changes 2016-04-18 22:54:39 +01:00
bendikro e370d7dbdd [Web] Fix error in WebApi in standalone mode
In GTKUI standalone mode, WebApi.enable would try to connect to
daemon if web.conf had the 'default_daemon' option set, causing
the client calls to break.
2016-04-18 21:03:03 +01:00
bendikro 38e0bc1257 [Core] Handle error when adding torrents to session at startup 2016-04-18 19:15:27 +01:00
bendikro 47f14845ca [GTKUI] Fix #2802: GTKUI classic mode shutdown procedure is broken
Fix by leaving shutdown procedure to gtkui.py:
* Daemon no longer calls component.shutdown() in GTKUI classic mode
* Mainwindow no longer calls reactor.stop but instead fires a
  'gtkui_close' signal.
* gtkui.py installs custom SIGINT handler to initiate shutdown before
  stopping reactor.
2016-04-18 16:05:46 +01:00
bendikro 70d8b65f0a [WebUi] [Core] Fixes to plugin handling and WebUi plugin + tests
This should fix problems with errors occuring when failing to
enable plugins. Errors in plugin handling are handled better
and properly logged.

WebUI plugin in particular had issues when being enabled and disabled
multiple times because it was trying to create DelugeWeb component
each time it was enabled. If deluge-web is already listening on
the same port, enabling the WebUI plugin will fail, and the checkbox
will not be checked.

There are still some issues when enabling/disabling plugins by
clicking fast multiple times on the checkbox.
2016-04-18 15:49:30 +01:00
Calum Lind 5ebe14e452 [Core] Remove old twisted DeprecationWarning code 2016-04-18 15:47:17 +01:00
Calum Lind 36ecd5625a [UI] Cleanup logrotate option
Keeps a consistent naming for log options
2016-04-18 15:42:24 +01:00
Calum Lind f036c1a6c5 [Core] Fix stdout object when stopping daemon 2016-04-18 15:29:52 +01:00
bendikro 64c67a07dd [WebUI] Fix #2798: WebUI plugin fails to start 2016-04-18 12:01:02 +01:00
Calum Lind 092d496944 [WebUI] Cleanup donotdaemonize 2016-04-18 11:56:38 +01:00
bendikro 5edb923904 [Base] Split main.py into ui/ui_entry.py and core/daemon_entry.py 2016-04-18 09:36:20 +02:00
bendikro 6300f9154a [#1949] [UI] Allow setting max size for rotating log file 2016-04-18 09:36:13 +02:00
bendikro c90af1ce6c [UI] Add --profile to GTKUI and console and allow custom filename
Add --profile to commonoptions making the option now available for
daemon and all UIs. --profile option now prints to stdout unless an
optional filename is specified.
2016-04-18 00:54:45 +02:00
bendikro 7b54a2a1ee [UI] Replace optparse with argparse for cmd arguments handling
optparse is deprecation and succeeded by argparse. See
https://www.python.org/dev/peps/pep-0389
2016-04-18 00:53:37 +02:00
Jamie Lennox aa82efd4f1 [#1974] [UI] Decouple UI selection from core.
Add entry points into setup for each of the UIs and then use this
information to determine which client UI to run.

This ensures that custom UIs may be written and run without
the need to modifify deluge source code.
2016-04-17 13:51:40 +02:00
Jamie Lennox 6343f32d70 [#1973] [UI] Standardize child cmd option parsing.
Handle child args and -a args in a common way so that all children
accept the same input format. Modify UIs to pass through setup
arguments to the base class.

Instead of launching the UI directly launch the UI via the _UI
subclasses in the same way that the scripts launch the clients.
2016-04-17 13:36:15 +02:00
Jamie Lennox b86a021042 [#1972] [UI] Remove ui.UI class
The only use of the ui.UI class is a base for Web which never calls
__init__ and at the beginning when choosing which UI to launch,
however that doesn't need to be an object.
2016-04-17 13:36:15 +02:00
Jamie Lennox 7af8a4cf14 [#1971] [UI] Unify common cmd options handling.
Add a CommonOptionParser which handles the standard set of options
for all UIs.
2016-04-17 13:36:15 +02:00
bendikro 38a480ac14 [Core] Revert "Cache items in get_filter_tree"
This reverts commit affe47a11c
as it causes the All filter state field to be zero in classic mode.
2016-04-17 12:13:49 +01:00
bendikro 3b84eb635c [GTKUI] Fix torrents not showing in classic mode
Commit 5d1aff157e implementing async_add_torrent cause torrents
not to show in classic mode.
2016-04-17 12:13:49 +01:00
Calum Lind 6287a782a1 [Lint] Fix Redundant use of assertFalse with constant value True 2016-04-16 18:24:20 +01:00
Calum Lind e468436b0c [Lint] Update pylintrc and fixup code for newly introduced messages
* pylintrc is now compatible with pylint 1.6.
 * Add to ignore wrong-import-position and wrong-import-order as
   we use isort and pylint is raising too many incorrect messages.
2016-04-12 14:12:21 +01:00
bendikro 10e1a2a593 [Core] Catch exception on call to lt.listen_on() 2016-04-11 11:56:34 +01:00
bendikro 194d1291e1 [Core] Emit ConfigValueChangedEvent only in started state 2016-04-11 11:56:34 +01:00
bendikro 085dc76e41 [Core] Set default torrent status message
Torrent status message could remain None is some cases
2016-04-11 11:56:34 +01:00
bendikro b0b9180943 [Core] Return Deferred from rename_files and rename_folder
core.rename_files and core.rename_folder now returns a Deferred
that callbacks when rename is finished.
2016-04-11 11:56:34 +01:00
bendikro af6f2b2107 [Core] Allow renaming torrent to empty string to remove the folder 2016-04-11 11:56:34 +01:00
bendikro 887afa9389 [GTKUI] Fix bugs in files_tab and added tests
After renaming files/directories in GTKUI, the file list wasn't
properly updated, requiring to choose another torrent to get
a file list update.
2016-04-11 11:56:34 +01:00
bendikro d84ffa50c3 [GTKUI] Fix bug in gtkui/common.reparent_iter() 2016-04-11 11:56:34 +01:00
bendikro eda493e525 [GTKUI] Improve error handling in torrent details
If status is missing a key required for a widget a KeyError
was not always caught.
2016-04-11 11:56:34 +01:00
bendikro 712b2715d4 [Tests] Fix to json tests 2016-04-11 01:36:49 +02:00
bendikro d8c4d8c1aa [Core] Fix to async_add_torrent commmit (5d1aff15) 2016-04-11 00:43:58 +02:00
bendikro 5d1aff157e [Core] Implement async_add_torrent in torrentmanager 2016-04-10 11:46:22 +01:00
Calum Lind 73220b5116 [Lint] Fix issues picked up by scrutinizer 2016-04-10 10:58:57 +01:00
bendikro d58960d723 [Tests] [Web] Make JSON independent of Web component
* Implement JSONTestCase in test_json_api.py
* Implement WebAPITestCase test case in test_web_api.py
2016-04-10 00:10:53 +02:00
bendikro bcc1db12e5 [Tests] Improved common.start_core
* Replace Popen with reactor.spawnProcess and read process
  output with twisted.internet.protocol.ProcessProtocol
* Implement support for running custom script code
* Now logs to stdout instead of stderr when not logging to file
2016-04-10 00:10:48 +02:00
bendikro 533951afea [#2724] [Web] Forward exceptions in JSON-RPC back to caller
Exceptions raised by calls performed by a JSON request would
not always be handled properly resulting in no reply to be sent
leading to browser timeouts.

Fix this by including the raised error in the JSON data of a
regular (successful) HTTP response.
2016-04-09 22:19:48 +02:00
bendikro 93023c5bfc [Core] Fix bug and add error testing to AuthManager 2016-04-09 22:19:48 +02:00
bendikro 9319e07db5 [Webui] Show user in connection manager 2016-04-09 22:19:48 +02:00
bendikro 9b18fb2b71 [Tests] Fix failing SessionProxy tests
For some reason, the time.sleep calls in the tests in
test_sessionproxy did not sleep for the expected amount
of time causing the results to differ from the expected.
Fixed by replacing time.time function with twisted's
task.clock.seconds and advancing the clock manually.

Also minor changes to test_client.py
2016-04-09 22:19:44 +02:00
bendikro cae8a18437 [Tests] Fixes to improve terminal output from unit tests
Add __str__ to WrappedException so that the stacktrace is printed when a
unit test raises a WrappedException.

Change the log output from error to warning in DelugeRPCProtocol.dispatch
when sending back a raised exception on an RPC request.
2016-04-08 16:35:09 +02:00
bendikro 374989a2ad [Tests] Catch and print errors in setup/teardown 2016-04-08 16:35:09 +02:00