Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some crashes #409

Merged
merged 3 commits into from
Apr 21, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,016 changes: 694 additions & 322 deletions res/i18n/ts/de_DE.ts

Large diffs are not rendered by default.

1,000 changes: 734 additions & 266 deletions res/i18n/ts/es_ES.ts

Large diffs are not rendered by default.

1,009 changes: 739 additions & 270 deletions res/i18n/ts/fr_FR.ts

Large diffs are not rendered by default.

1,000 changes: 736 additions & 264 deletions res/i18n/ts/it_IT.ts

Large diffs are not rendered by default.

1,007 changes: 727 additions & 280 deletions res/i18n/ts/pl_PL.ts

Large diffs are not rendered by default.

1,003 changes: 729 additions & 274 deletions res/i18n/ts/pt_BR.ts

Large diffs are not rendered by default.

1,024 changes: 686 additions & 338 deletions res/i18n/ts/ru_RU.ts

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/sakia/core/registry/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ async def published_uid(self, community):
if person_uid == self.uid:
return True
except errors.UcoinError as e:
if e.ucode in (errors.NO_MATCHING_IDENTITY):
if e.ucode in (errors.NO_MATCHING_IDENTITY, errors.NO_MEMBER_MATCHING_PUB_OR_UID):
logging.debug("Lookup error : {0}".format(str(e)))
except NoPeerAvailable as e:
logging.debug(str(e))
Expand Down
10 changes: 10 additions & 0 deletions src/sakia/gui/process_cfg_community.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@

import logging
import asyncio

import aiohttp

from ucoinpy.api import errors
Expand Down Expand Up @@ -65,6 +66,7 @@ async def check_guest(self, checked=False):
server = self.config_dialog.lineedit_server.text()
port = self.config_dialog.spinbox_port.value()
logging.debug("Is valid ? ")
self.config_dialog.label_error.setText(self.tr("connecting..."))
try:
self.node = await Node.from_address(None, server, port, session=aiohttp.ClientSession())
community = Community.create(self.node)
Expand All @@ -78,12 +80,15 @@ async def check_guest(self, checked=False):
self.config_dialog.label_error.setText(str(e))
#except (MalformedDocumentError, ValueError) as e:
# self.config_dialog.label_error.setText(str(e))
except aiohttp.errors.TimeoutError:
self.config_dialog.label_error.setText(self.tr("Could not connect. Check hostname, ip address or port"))

@asyncify
async def check_connect(self, checked=False):
server = self.config_dialog.lineedit_server.text()
port = self.config_dialog.spinbox_port.value()
logging.debug("Is valid ? ")
self.config_dialog.label_error.setText(self.tr("connecting..."))
try:
self.node = await Node.from_address(None, server, port, session=aiohttp.ClientSession())
community = Community.create(self.node)
Expand All @@ -108,12 +113,15 @@ async def check_connect(self, checked=False):
self.config_dialog.label_error.setText(str(e))
except NoPeerAvailable:
self.config_dialog.label_error.setText(self.tr("Could not connect. Check node peering entry"))
except aiohttp.errors.TimeoutError:
self.config_dialog.label_error.setText(self.tr("Could not connect. Check hostname, ip address or port"))

@asyncify
async def check_register(self, checked=False):
server = self.config_dialog.lineedit_server.text()
port = self.config_dialog.spinbox_port.value()
logging.debug("Is valid ? ")
self.config_dialog.label_error.setText(self.tr("connecting..."))
try:
session = aiohttp.ClientSession()
self.node = await Node.from_address(None, server, port, session=session)
Expand Down Expand Up @@ -152,6 +160,8 @@ async def check_register(self, checked=False):
self.config_dialog.label_error.setText(str(e))
except NoPeerAvailable:
self.config_dialog.label_error.setText(self.tr("Could not connect. Check node peering entry"))
except aiohttp.errors.TimeoutError:
self.config_dialog.label_error.setText(self.tr("Could not connect. Check hostname, ip address or port"))

def is_valid(self):
return self.node is not None
Expand Down