Skip to content

Commit

Permalink
Merge pull request #776 from adobe-apiplatform/fix/sign-client-error
Browse files Browse the repository at this point in the history
Sign timeout error
  • Loading branch information
adorton-adobe authored Mar 29, 2022
2 parents 0102f2c + 29b8211 commit 5c1d01a
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 724 deletions.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
'click-default-group',
'configparser==3.7.4',
'schema==0.7.2',
'sign-client'
'sign-client~=0.2.1',
],
extras_require={
':sys_platform=="linux" or sys_platform=="linux2"': [
Expand Down
690 changes: 0 additions & 690 deletions sign_client/poetry.lock

This file was deleted.

32 changes: 0 additions & 32 deletions sign_client/pyproject.toml

This file was deleted.

45 changes: 45 additions & 0 deletions sign_client/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from setuptools import setup, find_packages

version_namespace = {}
with open('sign_client/version.py') as f:
exec(f.read(), version_namespace)

setup(name='sign-client',
version=version_namespace['__version__'],
description='Client for the Adobe Sign API',
classifiers=[
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'License :: OSI Approved :: MIT License',
],
maintainer='Andrew Dorton',
maintainer_email='[email protected]',
license='MIT',
packages=find_packages(),
install_requires=[
"requests~=2.26.0",
"aiohttp~=3.8.1",
],
zip_safe=False)
4 changes: 3 additions & 1 deletion sign_client/sign_client/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import aiohttp
import requests

from aiohttp.client_exceptions import ServerTimeoutError

from .error import AssertionException, TimeoutException

from .model import GroupInfo, UsersInfo, DetailedUserInfo, GroupsInfo, UserGroupsInfo, JSONEncoder, DetailedGroupInfo, UserStateInfo
Expand Down Expand Up @@ -343,7 +345,7 @@ async def call_with_retry_async(self, method, url, header, data=None, session=No
else:
# PUT calls respond with an empty body
return body, r.status
except TimeoutException as err:
except (TimeoutException, ServerTimeoutError) as err:
retry_nb += 1
self.logger.warning('Call failed: Type: {} - Message: {}'.format(type(err), err))
if retry_nb == (self.max_sign_retries + 1):
Expand Down
1 change: 1 addition & 0 deletions sign_client/sign_client/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = '0.2.1'

0 comments on commit 5c1d01a

Please sign in to comment.