Skip to content

Commit 5c1d01a

Browse files
Merge pull request #776 from adobe-apiplatform/fix/sign-client-error
Sign timeout error
2 parents 0102f2c + 29b8211 commit 5c1d01a

File tree

6 files changed

+50
-724
lines changed

6 files changed

+50
-724
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656
'click-default-group',
5757
'configparser==3.7.4',
5858
'schema==0.7.2',
59-
'sign-client'
59+
'sign-client~=0.2.1',
6060
],
6161
extras_require={
6262
':sys_platform=="linux" or sys_platform=="linux2"': [

sign_client/poetry.lock

Lines changed: 0 additions & 690 deletions
This file was deleted.

sign_client/pyproject.toml

Lines changed: 0 additions & 32 deletions
This file was deleted.

sign_client/setup.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright (c) 2016-2017 Adobe Inc. All rights reserved.
2+
#
3+
# Permission is hereby granted, free of charge, to any person obtaining a copy
4+
# of this software and associated documentation files (the "Software"), to deal
5+
# in the Software without restriction, including without limitation the rights
6+
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
# copies of the Software, and to permit persons to whom the Software is
8+
# furnished to do so, subject to the following conditions:
9+
#
10+
# The above copyright notice and this permission notice shall be included in all
11+
# copies or substantial portions of the Software.
12+
#
13+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
# SOFTWARE.
20+
21+
from setuptools import setup, find_packages
22+
23+
version_namespace = {}
24+
with open('sign_client/version.py') as f:
25+
exec(f.read(), version_namespace)
26+
27+
setup(name='sign-client',
28+
version=version_namespace['__version__'],
29+
description='Client for the Adobe Sign API',
30+
classifiers=[
31+
'Programming Language :: Python :: 3.7',
32+
'Programming Language :: Python :: 3.8',
33+
'Programming Language :: Python :: 3.9',
34+
'Programming Language :: Python :: 3.10',
35+
'License :: OSI Approved :: MIT License',
36+
],
37+
maintainer='Andrew Dorton',
38+
maintainer_email='[email protected]',
39+
license='MIT',
40+
packages=find_packages(),
41+
install_requires=[
42+
"requests~=2.26.0",
43+
"aiohttp~=3.8.1",
44+
],
45+
zip_safe=False)

sign_client/sign_client/client.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
import aiohttp
77
import requests
88

9+
from aiohttp.client_exceptions import ServerTimeoutError
10+
911
from .error import AssertionException, TimeoutException
1012

1113
from .model import GroupInfo, UsersInfo, DetailedUserInfo, GroupsInfo, UserGroupsInfo, JSONEncoder, DetailedGroupInfo, UserStateInfo
@@ -343,7 +345,7 @@ async def call_with_retry_async(self, method, url, header, data=None, session=No
343345
else:
344346
# PUT calls respond with an empty body
345347
return body, r.status
346-
except TimeoutException as err:
348+
except (TimeoutException, ServerTimeoutError) as err:
347349
retry_nb += 1
348350
self.logger.warning('Call failed: Type: {} - Message: {}'.format(type(err), err))
349351
if retry_nb == (self.max_sign_retries + 1):

sign_client/sign_client/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = '0.2.1'

0 commit comments

Comments
 (0)