Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 455ab77

Browse files
committed
Get rid of #! lines, references to usage as __main__, README.txt, and
http://www.red-dove.com/python_logging.html.
1 parent 57102f8 commit 455ab77

3 files changed

Lines changed: 4 additions & 36 deletions

File tree

Lib/logging/__init__.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#! /usr/bin/env python
2-
#
31
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
42
#
53
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
1513
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
1614
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1715
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18-
#
19-
# For the change history, see README.txt in the distribution.
20-
#
21-
# This file is part of the Python logging distribution. See
22-
# http://www.red-dove.com/python_logging.html
23-
#
2416

2517
"""
2618
Logging package for Python. Based on PEP 282 and comments thereto in
@@ -58,16 +50,11 @@
5850
#
5951
#_srcfile is used when walking the stack to check when we've got the first
6052
# caller stack frame.
61-
#If run as a script, __file__ is not bound.
62-
#
63-
if __name__ == "__main__":
64-
_srcfile = None
53+
if string.lower(__file__[-4:]) in ['.pyc', '.pyo']:
54+
_srcfile = __file__[:-4] + '.py'
6555
else:
66-
if string.lower(__file__[-4:]) in ['.pyc', '.pyo']:
67-
_srcfile = __file__[:-4] + '.py'
68-
else:
69-
_srcfile = __file__
70-
_srcfile = os.path.normcase(_srcfile)
56+
_srcfile = __file__
57+
_srcfile = os.path.normcase(_srcfile)
7158

7259
#
7360
#_startTime is used as the base when calculating the relative time of events
@@ -1178,6 +1165,3 @@ def shutdown():
11781165
for h in _handlers.keys():
11791166
h.flush()
11801167
h.close()
1181-
1182-
if __name__ == "__main__":
1183-
print __doc__

Lib/logging/config.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#! /usr/bin/env python
2-
#
31
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
42
#
53
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
1513
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
1614
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1715
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18-
#
19-
# For the change history, see README.txt in the distribution.
20-
#
21-
# This file is part of the Python logging distribution. See
22-
# http://www.red-dove.com/python_logging.html
23-
#
2416

2517
"""
2618
Logging package for Python. Based on PEP 282 and comments thereto in

Lib/logging/handlers.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#! /usr/bin/env python
2-
#
31
# Copyright 2001-2002 by Vinay Sajip. All Rights Reserved.
42
#
53
# Permission to use, copy, modify, and distribute this software and its
@@ -15,12 +13,6 @@
1513
# ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER
1614
# IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
1715
# OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
18-
#
19-
# For the change history, see README.txt in the distribution.
20-
#
21-
# This file is part of the Python logging distribution. See
22-
# http://www.red-dove.com/python_logging.html
23-
#
2416

2517
"""
2618
Logging package for Python. Based on PEP 282 and comments thereto in

0 commit comments

Comments
 (0)