Skip to content

Commit

Permalink
Remove unnecessary exception handlings
Browse files Browse the repository at this point in the history
  • Loading branch information
beavailable committed Mar 18, 2022
1 parent 9069e58 commit c56d398
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions share.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,13 @@ def do_GET(self):
self.wfile.write(self.ico)
return
if not self.password or self._check_password():
try:
self.do_get()
except:
self.respond_internal_server_error()
self.do_get()
return
self.respond_ok(self._build_html_for_password())

def do_POST(self):
if not self.password or self._check_password():
try:
self.do_post()
except:
self.respond_internal_server_error()
self.do_post()
return
content_length = self.headers['Content-Length']
if not content_length or not content_length.isdecimal():
Expand Down

0 comments on commit c56d398

Please sign in to comment.