From ee570ddfeb750df7e2b58dd08a683b957ea08983 Mon Sep 17 00:00:00 2001 From: RossTheRoss Date: Mon, 8 Mar 2021 10:54:26 -0600 Subject: rearrange --- csci4131/hw4/strap012/strap012.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/csci4131/hw4/strap012/strap012.py b/csci4131/hw4/strap012/strap012.py index f498222..df63e4f 100644 --- a/csci4131/hw4/strap012/strap012.py +++ b/csci4131/hw4/strap012/strap012.py @@ -23,9 +23,9 @@ def check_perms(resource): def getContents(type, file): returnValue = "".encode() try: - content = open(file, 'rb') if not check_perms(file): raise PermissionError + content = open(file, 'rb') except FileNotFoundError: returnValue = NOT_FOUND.encode() with open("404.html", "rb") as fof: -- cgit v1.2.3