Merge pull request #1110 from lbryio/Jeremy1026-add-new-exception

Jeremy1026 add new exception
This commit is contained in:
hackrush 2018-02-18 11:51:51 +05:30 committed by GitHub
commit c4c443d8d7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 1 deletions

View file

@ -25,10 +25,13 @@ at anytime.
* `blob_list` failing with --uri parameter (https://github.com/lbryio/lbry/issues/895)
* `get` failing with a non-useful error message when given a uri for a channel claim
* exception checking in several wallet unit tests
* daemon not erring properly for non-numeric values being passed to the `bid` parameter for the `publish` method
*
### Deprecated
* `channel_list_mine`, replaced with `channel_list`
* `get_availability`, replaced with `stream_availability`
*
### Added
* link to instructions on how to change the default peer port
@ -46,6 +49,7 @@ at anytime.
* `txid`, `nout`, `channel_claim_id`, `channel_claim_name`, `status`, `blobs_completed`, and `blobs_in_stream` fields to file objects returned by `file_list` and `get`
* `txid`, `nout`, `channel_claim_id`, and `channel_claim_name` filters for `file` commands (`file_list`, `file_set_status`, `file_reflect`, and `file_delete`)
* unit tests for `SQLiteStorage` and updated old tests for relevant changes (https://github.com/lbryio/lbry/issues/1088)
*
### Changed
* default download folder on linux from `~/Downloads` to `XDG_DOWNLOAD_DIR`
@ -70,6 +74,7 @@ at anytime.
* dht `Node` class to re-attempt joining the network every 60 secs if no peers are known
* lbrynet database and file manager to separate the creation of lbry files (from downloading or publishing) from the handling of a stream. All files have a stream, but not all streams may have a file. (https://github.com/lbryio/lbry/issues/1020)
* manager classes to use new `SQLiteStorage` for database interaction. This class uses a single `lbrynet.sqlite` database file.
*
### Removed
* `seccure` and `gmpy` dependencies
@ -82,6 +87,7 @@ at anytime.
* unnecessary `TempBlobManager` class
* old storage classes used by the file manager, wallet, and blob manager
* old `.db` database files from the data directory
*
## [0.18.0] - 2017-11-08
### Fixed

View file

@ -2001,8 +2001,11 @@ class Daemon(AuthJSONRPCServer):
except (TypeError, URIParseError):
raise Exception("Invalid name given to publish")
if not isinstance(bid, (float, int)):
raise TypeError("Bid must be a float or an integer.")
if bid <= 0.0:
raise Exception("Invalid bid")
raise ValueError("Bid value must be greater than 0.0")
if bid >= self.session.wallet.get_balance():
raise InsufficientFundsError('Insufficient funds. ' \