Skip to content

Commit f075e97

Browse files
committed
chore(lint): _ unused var; replace assert wth if/raise; whitespace
1 parent bbad7fe commit f075e97

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

roundup/cgi/wsgi_handler.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
'a given amount of time ("rate limiting")',
2828
)
2929

30+
3031
class Headers(object):
3132
""" Idea more or less stolen from the 'apache.py' in same directory.
3233
Except that wsgi stores http headers in environment.
@@ -68,7 +69,7 @@ def __init__(self, environ, start_response):
6869

6970
def start_response(self, headers, response_code):
7071
"""Set HTTP response code"""
71-
message, explain = BaseHTTPRequestHandler.responses[response_code]
72+
message, _explain = BaseHTTPRequestHandler.responses[response_code]
7273
self.__wfile = self.__start_response('%d %s' % (response_code,
7374
message), headers)
7475

@@ -81,7 +82,8 @@ def get_wfile(self):
8182
class RequestDispatcher(object):
8283
def __init__(self, home, debug=False, timing=False, lang=None,
8384
feature_flags=None):
84-
assert os.path.isdir(home), '%r is not a directory' % (home,)
85+
if not os.path.isdir(home):
86+
raise ValueError('%r is not a directory' % (home,))
8587
self.home = home
8688
self.debug = debug
8789
self.timing = timing

0 commit comments

Comments
 (0)