From b6cdcff5e4d2bbf5342db3466b316dd6210bc035 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Thu, 27 Oct 2022 18:21:58 +0300 Subject: [PATCH] Fix deprecated open mode `rU` -> `r` --- bin/browser_stack.py | 2 +- lib/python/init.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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) -- 2.39.2