handeling user with not enougth permissions on the other scripts

This commit is contained in:
rafael.ameijeiras 2021-06-09 13:23:01 +02:00
parent c707a57634
commit 0cf63c3aa0
2 changed files with 6 additions and 0 deletions

View File

@ -102,6 +102,9 @@ def get_graph_by_moduleid (baseUrl,pUser, pPass, apiPass, moduleId, graphInterva
if graph.text == "Id does not exist in database.":
print (f"Error requested Pandora api url, status code: {graph.text}. skipping graph generation")
return None
if graph.text == "The user has not enough permissions for perform this action.":
print (f"Error requested Pandora api url, status code: {graph.text} Skiping graph generation")
return None
except:
print("Error requested api url. skipping graph generation")
return None

View File

@ -106,6 +106,9 @@ def get_graph_by_moduleid (baseUrl,pUser, pPass, apiPass, moduleId, graphInterva
if graph.text == "Id does not exist in database.":
print (f"Error requested Pandora api url, status code: {graph.text}. skipping graph generation")
return None
if graph.text == "The user has not enough permissions for perform this action.":
print (f"Error requested Pandora api url, status code: {graph.text} Skiping graph generation")
return None
except:
print("Error requested api url. skipping graph generation")