X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bin%2Fbrowser_stack.py;h=7018dc6527e69a4b33676a0e3862c537411c3b64;hb=HEAD;hp=94e6c607fa8700fb20351b8e794e0c1249667537;hpb=9018b95f07313e4df571fa6959e2642db3914dc2;p=dotfiles.git diff --git a/bin/browser_stack.py b/bin/browser_stack.py index 94e6c60..7018dc6 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 [] @@ -19,4 +19,5 @@ def save_stack(stack): def set_current_browser(): stack = get_stack() if stack: - os.environ['BROWSER'] = stack[0].strip() + os.environ['BROWSER'] = browser = stack[0].strip() + return browser