Skip to content

Commit

Permalink
Merge pull request #409 from vtexier/dev
Browse files Browse the repository at this point in the history
fix some crashes
  • Loading branch information
Insoleet committed Apr 21, 2016
2 parents 26173b1 + c6ddd5f commit 8d82882
Show file tree
Hide file tree
Showing 9 changed files with 5,056 additions and 2,015 deletions.
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

0 comments on commit 8d82882

Please sign in to comment.