mirror of
https://github.com/pypa/pip
synced 2023-12-13 21:30:23 +01:00
Resolve dirname given a log filename like 'foo.log'. Fixes #90.
This commit is contained in:
parent
3a419a21a3
commit
1397f923a5
|
@ -188,6 +188,7 @@ def open_logfile(filename, mode='a'):
|
|||
the file to separate past activity from current activity.
|
||||
"""
|
||||
filename = os.path.expanduser(filename)
|
||||
filename = os.path.abspath(filename)
|
||||
dirname = os.path.dirname(filename)
|
||||
if not os.path.exists(dirname):
|
||||
os.makedirs(dirname)
|
||||
|
|
Loading…
Reference in a new issue