Commit d9cf658a authored by Denis Bilenko's avatar Denis Bilenko

pywsgi: rename _weekdayname and _monthname to all caps

parent 7b9306bd
...@@ -20,8 +20,8 @@ __all__ = ['WSGIHandler', 'WSGIServer'] ...@@ -20,8 +20,8 @@ __all__ = ['WSGIHandler', 'WSGIServer']
MAX_REQUEST_LINE = 8192 MAX_REQUEST_LINE = 8192
# Weekday and month names for HTTP date/time formatting; always English! # Weekday and month names for HTTP date/time formatting; always English!
_weekdayname = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"] _WEEKDAYNAME = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"]
_monthname = [None, # Dummy so we can use 1-based month numbers _MONTHNAME = [None, # Dummy so we can use 1-based month numbers
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jan", "Feb", "Mar", "Apr", "May", "Jun",
"Jul", "Aug", "Sep", "Oct", "Nov", "Dec"] "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
...@@ -34,8 +34,8 @@ _INTERNAL_ERROR_HEADERS = [('Content-Type', 'text/plain'), ...@@ -34,8 +34,8 @@ _INTERNAL_ERROR_HEADERS = [('Content-Type', 'text/plain'),
def format_date_time(timestamp): def format_date_time(timestamp):
year, month, day, hh, mm, ss, wd, y, z = time.gmtime(timestamp) year, month, day, hh, mm, ss, wd, _y, _z = time.gmtime(timestamp)
return "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (_weekdayname[wd], day, _monthname[month], year, hh, mm, ss) return "%s, %02d %3s %4d %02d:%02d:%02d GMT" % (_WEEKDAYNAME[wd], day, _MONTHNAME[month], year, hh, mm, ss)
class Input(object): class Input(object):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment