:debug completely deprecated in favour of DEBUG=
This commit is contained in:
@@ -39,8 +39,11 @@ def cgi_parse_environ(environ):
|
||||
# get options
|
||||
|
||||
if 'REQUEST_URI' in environ:
|
||||
# when running on Apache
|
||||
url = environ['REQUEST_URI'][1:]
|
||||
|
||||
else:
|
||||
# when using internal server
|
||||
url = environ['PATH_INFO'][1:]
|
||||
|
||||
if environ['QUERY_STRING']:
|
||||
|
@@ -39,14 +39,13 @@ class MorssException(Exception):
|
||||
|
||||
|
||||
def log(txt):
|
||||
if ('DEBUG' in os.environ
|
||||
or ':debug' in os.environ.get('REQUEST_URI', '')
|
||||
or ':debug' in os.environ.get('PATH_INFO', '')
|
||||
):
|
||||
if 'DEBUG' in os.environ:
|
||||
if 'REQUEST_URI' in os.environ:
|
||||
# when running on Apache
|
||||
open('morss.log', 'a').write("%s\n" % repr(txt))
|
||||
|
||||
else:
|
||||
# when using internal server or cli
|
||||
print(repr(txt))
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user