Skip to content

Commit b1d8b66

Browse files
[TASKSCLOUD-334] - Fixed some minor issues.
1 parent 95afb90 commit b1d8b66

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

asposetaskscloud/api_client.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -596,8 +596,7 @@ def __deserialize_datatime(self, string):
596596
return datetime.datetime.min
597597
else:
598598
from dateutil.parser import parse
599-
result = parse(string)
600-
return result
599+
return parse(string)
601600
except ImportError:
602601
return string
603602
except ValueError:
@@ -664,7 +663,14 @@ def __convert_array(self, array):
664663

665664
@staticmethod
666665
def __downcase_first_letter(s):
667-
if len(s) == 0:
668-
return s
669-
else:
670-
return s[0].lower() + s[1:]
666+
length = len(s)
667+
i = 0
668+
result = ''
669+
if s[i].isupper():
670+
while length > i:
671+
result += s[i].lower()
672+
i += 1
673+
if length == i + 1 or s[i + 1].islower():
674+
break
675+
return result + s[i:]
676+

asposetaskscloud/rest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
except ImportError:
4242
raise ImportError('Swagger python client requires urllib3.')
4343

44+
4445
logger = logging.getLogger(__name__)
4546

4647

@@ -313,7 +314,6 @@ def _is_valid_json(data):
313314
except:
314315
return False
315316

316-
317317
class ApiException(Exception):
318318

319319
def __init__(self, status=None, reason=None, http_resp=None):

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# http://pypi.python.org/pypi/setuptools
1414

1515
REQUIRES = ["urllib3 >= 1.16", "six >= 1.10", "certifi", "python-dateutil"]
16+
TEST_REQUIRES = []
1617

1718
from os import path
1819
this_directory = path.abspath(path.dirname(__file__))

0 commit comments

Comments
 (0)