diff options
author | dirkf <fieldhouse@gmx.net> | 2023-07-25 00:17:15 +0100 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2023-07-25 13:19:43 +0100 |
commit | a25e9f3c84a34d43f78a4e5a6f6c2e98e2a0ade3 (patch) | |
tree | 869bde60dab873963705baae5b879b94a4b9c3a9 /youtube_dl/update.py | |
parent | aac33155e40af3da96a2467dd05faea201815989 (diff) |
[compat] Use `compat_open()`
Diffstat (limited to 'youtube_dl/update.py')
-rw-r--r-- | youtube_dl/update.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/youtube_dl/update.py b/youtube_dl/update.py index 84c964617..b5f26e4a9 100644 --- a/youtube_dl/update.py +++ b/youtube_dl/update.py @@ -9,7 +9,10 @@ import subprocess import sys from zipimport import zipimporter -from .compat import compat_realpath +from .compat import ( + compat_open as open, + compat_realpath, +) from .utils import encode_compat_str from .version import __version__ @@ -127,7 +130,7 @@ def update_self(to_screen, verbose, opener): try: bat = os.path.join(directory, 'youtube-dl-updater.bat') - with io.open(bat, 'w') as batfile: + with open(bat, 'w') as batfile: batfile.write(''' @echo off echo Waiting for file handle to be closed ... |