Beispiel #1
0
 def _assert_valid_setting_value(self, name, value):
     if name == "max_key_fee":
         currency = str(value["currency"]).upper()
         if currency not in self._fixed_defaults['CURRENCIES'].keys():
             raise InvalidCurrencyError(currency)
     elif name == "download_directory":
         directory = str(value)
         if not os.path.exists(directory):
             raise NoSuchDirectoryError(directory)
Beispiel #2
0
 def _validate_currency(self, currency):
     if currency not in self._fixed_defaults['CURRENCIES'].keys():
         raise InvalidCurrencyError(currency)