Fixup tasks for python 3 compatiblity

This commit is contained in:
Ivan Malison 2016-09-03 16:43:05 -07:00
parent 8ad259901d
commit 32d26d59c7
No known key found for this signature in database
GPG Key ID: 62530EFBE99DC2F8
2 changed files with 4 additions and 4 deletions

View File

@ -2,7 +2,7 @@ import os
from invoke import task as ctask from invoke import task as ctask
from util import RESOURCES_DIRECTORY from .util import RESOURCES_DIRECTORY
@ctask(default=True) @ctask(default=True)

View File

@ -225,8 +225,8 @@ def functions_for_filename(filename):
task_name = 'settings-diff:' + filename.replace('.', '-') task_name = 'settings-diff:' + filename.replace('.', '-')
@ctask(name=task_name) @ctask(name=task_name)
def task(ctx): def task(ctx):
print filepath print(filepath)
print filename print(filename)
ctx.run("zsh -c 'icdiff <(defaults read {0}) {1}'".format( ctx.run("zsh -c 'icdiff <(defaults read {0}) {1}'".format(
filename, filepath filename, filepath
)) ))
@ -247,5 +247,5 @@ def settings_write_all(ctx):
@ctask @ctask
def custom_keyboard_shortcuts(ctx): def custom_keyboard_shortcuts(ctx):
command_string = """defaults write -globalDomain NSUserKeyEquivalents '{"Enter Full Screen" = "@\U21a9";"Exit Full Screen" = "@\U21a9";"Full Screen" = "@\U21a9";}'""" command_string = b"""defaults write -globalDomain NSUserKeyEquivalents '{"Enter Full Screen" = "@\U21a9";"Exit Full Screen" = "@\U21a9";"Full Screen" = "@\U21a9";}'"""
ctx.run(command_string) ctx.run(command_string)