(self, params)
| 449 | return "success" |
| 450 | |
| 451 | def HandleLeaveChan(self, params): |
| 452 | if len(params) == 0: |
| 453 | raise APIError(0, 'I need parameters.') |
| 454 | elif len(params) == 1: |
| 455 | address, = params |
| 456 | status, addressVersionNumber, streamNumber, toRipe = self._verifyAddress(address) |
| 457 | address = addBMIfNotPresent(address) |
| 458 | if not BMConfigParser().has_section(address): |
| 459 | raise APIError(13, 'Could not find this address in your keys.dat file.') |
| 460 | if not BMConfigParser().safeGetBoolean(address, 'chan'): |
| 461 | raise APIError(25, 'Specified address is not a chan address. Use deleteAddress API call instead.') |
| 462 | BMConfigParser().remove_section(address) |
| 463 | with open(state.appdata + 'keys.dat', 'wb') as configfile: |
| 464 | BMConfigParser().write(configfile) |
| 465 | return 'success' |
| 466 | |
| 467 | def HandleDeleteAddress(self, params): |
| 468 | if len(params) == 0: |
nothing calls this directly
no test coverage detected