From: Oleg Broytman Date: Thu, 27 Oct 2022 15:21:58 +0000 (+0300) Subject: Fix deprecated open mode `rU` -> `r` X-Git-Url: https://git.phdru.name/?a=commitdiff_plain;h=b6cdcff5e4d2bbf5342db3466b316dd6210bc035;p=dotfiles.git Fix deprecated open mode `rU` -> `r` --- diff --git a/bin/browser_stack.py b/bin/browser_stack.py index 94e6c60..47b1774 100644 --- a/bin/browser_stack.py +++ b/bin/browser_stack.py @@ -4,7 +4,7 @@ browser_stack = os.path.expanduser('~/.cache/browser-stack') def get_stack(): try: - with open(browser_stack, 'rU') as stack_file: + with open(browser_stack, 'r') as stack_file: return stack_file.readlines() except IOError: # No such file return [] diff --git a/lib/python/init.py b/lib/python/init.py index eb832c1..1d365c6 100644 --- a/lib/python/init.py +++ b/lib/python/init.py @@ -309,7 +309,7 @@ def init(): return "Usage: cat('filename')" def __call__(self, filename): - fp = open(filename, 'rU') + fp = open(filename, 'r') text = fp.read() fp.close() print(text)