summaryrefslogtreecommitdiffstats
path: root/deluge/error.py
Commit message (Collapse)AuthorAge
* Upgrade codebase with pyupgrade (>=py3.6)DjLegolas2021-12-29
| | | | | | | | Added pyupgrade utility with manual stage to pre-commit and run on all files. Ref: https://github.com/asottile/pyupgrade Closes: deluge-torrent/deluge#326
* Remove all Python 2 supportdeluge-2.1.0.dev0DjLegolas2021-12-28
| | | | | | | | | * Removed all __future__ imports from code * Removed all six dependencies * Removed all future_builtins imports * Removed all Python 2 related code Closes: deluge-torrent/deluge#325
* [GTK] Fix showing correct error on libtorrent import errorbendikro2020-04-23
| | | | | | | | | | The exception string "No module named libtorrent" was changed to "No module named 'libtorrent'" in python 3.3, which results in a "unknown Import Error" message being displayed instead of the message meant for libtorrent import error. Change to raising LibtorrentImportError in _libtorrent.py and catch this error to display libtorrent specific import errors.
* [Lint] Use Black to auto-format codeCalum Lind2018-10-03
| | | | | | | | | | | | | | | | | The move to using auto-formatter makes it easier to read, submit and speeds up development time. https://github.com/ambv/black/ Although I would prefer 79 chars, the default line length of 88 chars used by black suffices. The flake8 line length remains at 120 chars since black does not touch comments or docstrings and this will require another round of fixes. The only black setting that is not standard is the use of double-quotes for strings so disabled any formatting of these. Note however that flake8 will still flag usage of double-quotes. I may change my mind on double vs single quotes but for now leave them. A new pyproject.toml file has been created for black configuration.
* Fix files to pass new Flake8 checkersCalum Lind2018-06-01
| | | | | | | | | | | Some new flake8 checkers were added so fix these new warnings and any issues uncovered. Use add-trailing-comma to fix missing trailing commas. It does not format it as well as I would like however it was fast to change and helps with git changes in future. Removed pylint from tox due to large number of warnings.
* [Py2to3] Force unicode_literals and fix related issuesCalum Lind2017-02-22
| | | | | | | | | | | | | | | | | | * Added `from __future__ import unicode_literals` to every file so now all strings in code are forced to be unicode strings unless marked as byte string `b'str'` or encoded to byte string `'str'.encode('utf-8')`. This is a large change but we have been working towards the goal of unicode strings passed in the code so decoding external input and encoding output as byte strings (where applicable). Note that in Python 2 the `str` type still refers to byte strings. * Replaced the use of `str` for `basestring` in isinstance comparison as this was the original intention but breaks code when encoutering unicode strings. * Marked byte strings in gtkui as the conversion to utf8 is not always handled, mostly related to gobject signal names.
* [Lint] Convert all python double quotes to single quotesCalum Lind2016-11-03
| | | | | | | | | | | | | | | | | | * A rather disruptive change but for a few reasons such as easier to read, easier type, keep consistent and javascript code uses single quotes. * There are a few exceptions for the automated process: * Any double quotes in comments * Triple double quotes for docstrings * Strings containing single quotes are left e.g. "they're" * To deal with merge conflicts from feature branches it is best to follow these steps for each commit: * Create a patch: `git format-patch -1 <sha1>` * Edit the patch and replace double quotes with single except those in comments or strings containing an unescaped apostrophe. * Check the patch `git apply --check <patchfile>` and fix any remaining issues if it outputs an error. * Apply the patch `git am < <patchfile>`
* [Lint] Enable pylint warning super-init-not-calledbendikro2016-11-03
|
* [Core] Implement async_add_torrent in torrentmanagerbendikro2016-04-10
|
* [Tests] Fixes to improve terminal output from unit testsbendikro2016-04-08
| | | | | | | | 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.
* Flake8 core and common filesCalum Lind2014-09-03
| | | | | | * 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
* Fix 2247: AttributeError in deluge.error.DaemonRunningErrorbendikro2013-05-26
| | | | | * Removed all the properties in error.py and added more tests * Handle failure in client.py handling RPC_ERROR (From older daemons)
* Wrap non deluge exceptions so that they can also be sent to the client.Pedro Algarvio2011-06-05
|
* Extend RPC Protocol.Pedro Algarvio2011-05-18
| | | | While adding the multiuser auth related stuff, RPC_AUTH_EVENT was added, simply to not touch how RPC_ERROR was handled. It was created to allow recreating the exception on the client side. Instead of adding another rpc event type, extend RPC_ERROR to send the proper data to recreate the exception on the client side.
* Fix #1281. Show a nice dialog stating that the client is incompatible on the ↵Pedro Algarvio2011-05-17
| | | | GTK UI.
* Force backwards incompatibility.Pedro Algarvio2011-05-15
| | | | Force clients prior to 1.4 to fail authentication, this was we might reduce tickets like #1852.
* Sorry for the noise. Email change.Pedro Algarvio2011-05-02
|
* More changes related to automatic connections.Pedro Algarvio2011-04-30
| | | | | | | Auto-connecting on start of the gtk ui is now fully working. Auto-staring localhost if needed is now also working. Authentication failures now get passed correctly to the client implementation which will allow the user to enter username and/or password to complete authentication. It's now possible to shutdown the daemon from the connection manager even if not on localhost, it just needs all required information to be present on the liststore.
* Test fixes and #1814 fix.Pedro Algarvio2011-04-27
| | | | | All test were adapted, and some more were added to comply with the new multiuser support in deluge. Regarding #1814, host entries in the Connection Manager UI are now migrated from the old format were automatic localhost logins were possible, which no longer is.
* Account Management Implemented.Pedro Algarvio2011-04-24
| | | | Account management is now implemented for the GTK UI. Some changes to the core were required since the clients need to know which authentication levels exist, and, to expose account creation, update, and removal to the clients. The best effort is done to try not to compromise the auth file.
* Use a specific response code for authentication requests. Recreate ↵Pedro Algarvio2011-04-22
| | | | authentication request exceptions on the client end.
* Move deluge errors to the errors module, they will be reused later on other ↵Pedro Algarvio2011-04-22
| | | | | | parts of code. Now, calling connect on client has two behaviours, if username/password is passed the client connects, authenticates and returns daemon info, if username/password is not passed, only the daemon info is returned. This might change a bit later on though.
* Add get_free_space() to coreAndrew Resch2009-07-24
|
* Add InvalidTorrentError.John Garland2009-07-24
|
* Detect when a daemon is already running in the same config folder.Andrew Resch2009-05-20
| | | | | | | When the gtkui is run in classic mode with an already running daemon process, prompt the user to turn off classic mode or exit.
* Add OpenSSL exception to all GPL headersAndrew Resch2009-05-18
|
* Remove OpenSSL exception from license headersAndrew Resch2008-11-23
|
* Remove trailing whitspace from *.pyAndrew Resch2008-11-17
|
* change copyright notices to gpl3Marcos Pinto2008-08-08
|
* Add error.py.Andrew Resch2008-02-10
Remove old cache decorator classes from client.py. Raise deluge.error.NoCoreError when attempting to use a client function when not connected to a daemon.