-#! /usr/bin/env python
import os, shutil
-browser_stack = os.path.expanduser('~/.config/browser-stack')
+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 []
def save_stack(stack):
- os.umask(0066) # octal -rw-------
+ os.umask(0o066) # octal -rw-------
with open(browser_stack+'.tmp', 'w') as stack_file:
stack_file.writelines(stack)
shutil.copy(browser_stack+'.tmp', browser_stack)