15 lines
342 B
Python
Executable File
15 lines
342 B
Python
Executable File
|
|
status_messages = {
|
|
200: "OK",
|
|
401: "Unauthenticated",
|
|
403: "Unauthorized",
|
|
404: "NotFound",
|
|
500: "Exception was raised while handling your request"
|
|
}
|
|
|
|
def getStatusMessage(statuscode):
|
|
if statuscode in status_messages:
|
|
return "{0} {1}".format(statuscode,status_messages[statuscode])
|
|
return "{0} unknown status".format(statuscode)
|
|
|