]> git.phdru.name Git - dotfiles.git/commitdiff
Fix deprecated open mode `rU` -> `r`
authorOleg Broytman <phd@phdru.name>
Thu, 27 Oct 2022 15:21:58 +0000 (18:21 +0300)
committerOleg Broytman <phd@phdru.name>
Thu, 27 Oct 2022 15:21:58 +0000 (18:21 +0300)
bin/browser_stack.py
lib/python/init.py

index 94e6c607fa8700fb20351b8e794e0c1249667537..47b17744c0eda98734bc8e08de3a6adeaa0836e2 100644 (file)
@@ -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 []
index eb832c1b77f640d8899815d3633754bc1ebcf1d2..1d365c62f9214c649be8f4dc65268a619865457c 100644 (file)
@@ -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)