Skip to content

Commit

Permalink
Updated the getProperties
Browse files Browse the repository at this point in the history
  • Loading branch information
achuthakamai committed Feb 7, 2024
1 parent 3aae854 commit 6a6db8c
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 6 deletions.
Binary file modified pyakamai/__pycache__/akamaimsl.cpython-311.pyc
Binary file not shown.
Binary file modified pyakamai/__pycache__/akamaiproperty.cpython-311.pyc
Binary file not shown.
Binary file modified pyakamai/__pycache__/http_calls.cpython-311.pyc
Binary file not shown.
Binary file modified pyakamai/__pycache__/pyakamai.cpython-311.pyc
Binary file not shown.
11 changes: 8 additions & 3 deletions pyakamai/akamaiproperty.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,10 +704,14 @@ def getPropertiesofGroup(self,contractid,groupid):
return propList

except Exception as e:
import traceback
track = traceback.format_exc()
print(track)
return []
'''import traceback
track = traceback.format_exc()
print(track)
pass'''





def bulkSearch(self,jsonPathMatch,jsonPathQualifiers=None):
Expand Down Expand Up @@ -746,6 +750,7 @@ def getallProperties(self):
for ctr in contractIds:
for grp in groupIds:
property_list = self.getPropertiesofGroup(ctr,grp)
#print(property_list)
if len(property_list) != 0:
for x in property_list:
propertylist.append(x)
Expand Down
6 changes: 3 additions & 3 deletions pyakamai/http_calls.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ def httpErrors(self, status_code, endpoint, result):
error_msg += "ERROR: Please ensure that the credentials you created for this script\n"
error_msg += "ERROR: have the necessary permissions in the Luna portal.\n"
error_msg += "ERROR: Problem details: %s\n" % details
exit(error_msg)
print(error_msg)

if status_code in [400, 401]:
error_msg = "ERROR: Call to %s failed with a %s result\n" % (endpoint, status_code)
Expand All @@ -188,7 +188,7 @@ def httpErrors(self, status_code, endpoint, result):
error_msg += "ERROR: Please ensure that the URL you're calling is valid and correctly formatted\n"
error_msg += "ERROR: or look at other examples to make sure yours matches.\n"
error_msg += "ERROR: Problem details: %s\n" % details
exit(error_msg)
print(error_msg)

error_string = None
if "errorString" in result:
Expand All @@ -204,6 +204,6 @@ def httpErrors(self, status_code, endpoint, result):
error_msg = "ERROR: Call caused a server fault.\n"
error_msg += "ERROR: Please check the problem details for more information:\n"
error_msg += "ERROR: Problem details: %s\n" % error_string
exit(error_msg)
print(error_msg)


0 comments on commit 6a6db8c

Please sign in to comment.