#! /usr/bin/env python
+from __future__ import print_function
import sys, os
from browser_stack import get_stack, save_stack
stack = get_stack()
if command in ('get', 'peek', 'print'):
- if stack: print stack[0],
+ if stack: print(stack[0], end='')
sys.exit()
elif command in ('list', 'list-all'):
- if stack: print ''.join(stack),
+ if stack: print(''.join(stack), end='')
sys.exit()
browser = os.path.basename(sys.argv[2]) + '\n'
-#! /usr/bin/env python
import os, shutil
browser_stack = os.path.expanduser('~/.cache/browser-stack')
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)