aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/cookies.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2022-03-27 07:50:43 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2022-04-05 18:12:18 +0530
commita44ca5a470e09b5170fc9c3a46733f050fadbfae (patch)
treeebb38c593e2427befb3e2d15c8bf178c682a0fd4 /yt_dlp/cookies.py
parent0a8a7e68fabf6fc9387f270301e51225ac349b00 (diff)
downloadhypervideo-pre-a44ca5a470e09b5170fc9c3a46733f050fadbfae.tar.lz
hypervideo-pre-a44ca5a470e09b5170fc9c3a46733f050fadbfae.tar.xz
hypervideo-pre-a44ca5a470e09b5170fc9c3a46733f050fadbfae.zip
[cleanup] Misc fixes
Closes https://github.com/yt-dlp/yt-dlp/pull/3213, Closes https://github.com/yt-dlp/yt-dlp/pull/3117 Related: https://github.com/yt-dlp/yt-dlp/issues/3146#issuecomment-1077323114, https://github.com/yt-dlp/yt-dlp/pull/3277#discussion_r841019671, https://github.com/yt-dlp/yt-dlp/commit/a825ffbffa0bea322e3ccb44c6f8e01d8d9572fb#commitcomment-68538986, https://github.com/yt-dlp/yt-dlp/issues/2360, https://github.com/yt-dlp/yt-dlp/commit/5fa3c9a88f597625296981a4a26be723e65d4842#r70393519, https://github.com/yt-dlp/yt-dlp/commit/5fa3c9a88f597625296981a4a26be723e65d4842#r70393254
Diffstat (limited to 'yt_dlp/cookies.py')
-rw-r--r--yt_dlp/cookies.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/yt_dlp/cookies.py b/yt_dlp/cookies.py
index 7265cad81..1f08a3664 100644
--- a/yt_dlp/cookies.py
+++ b/yt_dlp/cookies.py
@@ -21,6 +21,7 @@ from .compat import (
compat_cookiejar_Cookie,
)
from .utils import (
+ error_to_str,
expand_path,
Popen,
YoutubeDLCookieJar,
@@ -721,7 +722,7 @@ def _get_kwallet_network_wallet(logger):
network_wallet = stdout.decode('utf-8').strip()
logger.debug('NetworkWallet = "{}"'.format(network_wallet))
return network_wallet
- except BaseException as e:
+ except Exception as e:
logger.warning('exception while obtaining NetworkWallet: {}'.format(e))
return default_wallet
@@ -766,8 +767,8 @@ def _get_kwallet_password(browser_keyring_name, logger):
if stdout[-1:] == b'\n':
stdout = stdout[:-1]
return stdout
- except BaseException as e:
- logger.warning(f'exception running kwallet-query: {type(e).__name__}({e})')
+ except Exception as e:
+ logger.warning(f'exception running kwallet-query: {error_to_str(e)}')
return b''
@@ -823,8 +824,8 @@ def _get_mac_keyring_password(browser_keyring_name, logger):
if stdout[-1:] == b'\n':
stdout = stdout[:-1]
return stdout
- except BaseException as e:
- logger.warning(f'exception running find-generic-password: {type(e).__name__}({e})')
+ except Exception as e:
+ logger.warning(f'exception running find-generic-password: {error_to_str(e)}')
return None