summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2004-07-08 10:22:35 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2004-07-08 10:22:35 (GMT)
commit4bbab2bde4fa7df27d9b9f04793d53d4754e22b4 (patch)
tree403629c45d2188aa9eb4ef08156640ae4e76a33e
parent081483cd42fe221b568c3b0ce90ce3e867896c6c (diff)
downloadcpython-4bbab2bde4fa7df27d9b9f04793d53d4754e22b4.zip
cpython-4bbab2bde4fa7df27d9b9f04793d53d4754e22b4.tar.gz
cpython-4bbab2bde4fa7df27d9b9f04793d53d4754e22b4.tar.bz2
FileHandler now stores the basename as an absolute path (fix for SF #982049)
-rw-r--r--Lib/logging/__init__.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/logging/__init__.py b/Lib/logging/__init__.py
index cf4d782..e9bcf33 100644
--- a/Lib/logging/__init__.py
+++ b/Lib/logging/__init__.py
@@ -37,7 +37,7 @@ except ImportError:
__author__ = "Vinay Sajip <vinay_sajip@red-dove.com>"
__status__ = "beta"
__version__ = "0.4.9.3"
-__date__ = "03 July 2004"
+__date__ = "08 July 2004"
#---------------------------------------------------------------------------
# Miscellaneous module data
@@ -709,7 +709,9 @@ class FileHandler(StreamHandler):
Open the specified file and use it as the stream for logging.
"""
StreamHandler.__init__(self, open(filename, mode))
- self.baseFilename = filename
+ #keep the absolute path, otherwise derived classes which use this
+ #may come a cropper when the current directory changes
+ self.baseFilename = os.path.abspath(filename)
self.mode = mode
def close(self):