diff options
author | dirkf <fieldhouse@gmx.net> | 2023-07-20 19:32:29 +0100 |
---|---|---|
committer | dirkf <fieldhouse@gmx.net> | 2023-07-25 13:19:43 +0100 |
commit | 44faa71b19c866b836e4433ddd3e4722ac6d282f (patch) | |
tree | c318e3aa1a2966b101c758a53803fc0267506445 | |
parent | 7bce2ad441b874e7a1cf8cc81059c5601d832697 (diff) |
[test/test_execution.py] Use `compat_subprocess_get_DEVNULL()`
-rw-r--r-- | test/test_execution.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/test/test_execution.py b/test/test_execution.py index ae59e562a..56e1b679d 100644 --- a/test/test_execution.py +++ b/test/test_execution.py @@ -10,17 +10,14 @@ import os import subprocess sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) -from youtube_dl.compat import compat_register_utf8 +from youtube_dl.compat import compat_register_utf8, compat_subprocess_get_DEVNULL from youtube_dl.utils import encodeArgument compat_register_utf8() rootDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) -try: - _DEV_NULL = subprocess.DEVNULL -except AttributeError: - _DEV_NULL = open(os.devnull, 'wb') +_DEV_NULL = compat_subprocess_get_DEVNULL() class TestExecution(unittest.TestCase): |