Skip to content

Commit

Permalink
Merge pull request #368 from PyPlanet/bugfix/366
Browse files Browse the repository at this point in the history
Bugfix/366
  • Loading branch information
tomvlk committed Jun 15, 2017
2 parents 1efb10a + f1e2c54 commit d95daa8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pyplanet/apps/contrib/dedimania/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ async def execute(self, method, *args):
handle_exception(e, __name__, 'execute')
raise DedimaniaTransportException('Could not retrieve data from dedimania!')
except DedimaniaFault as e:
if 'Bad SessionId' in e.faultString:
if 'Bad SessionId' in e.faultString or ('SessionId' in e.faultString and 'not found' in e.faultString):
try:
self.retries += 1
if self.retries > 5:
Expand All @@ -114,7 +114,9 @@ async def execute(self, method, *args):
except:
return
logger.error('XML-RPC Fault retrieved from Dedimania: {}'.format(str(e)))
handle_exception(e, __name__, 'execute')
handle_exception(e, __name__, 'execute', extra_data={
'dedimania_retries': self.retries,
})
raise DedimaniaTransportException('Could not retrieve data from dedimania!')

async def multicall(self, *queries):
Expand Down

0 comments on commit d95daa8

Please sign in to comment.