Skip to content

Instantly share code, notes, and snippets.

@untitaker
Created May 2, 2015 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save untitaker/65042a4c1fd9436ab71d to your computer and use it in GitHub Desktop.
Save untitaker/65042a4c1fd9436ab71d to your computer and use it in GitHub Desktop.
diff --git a/khal/cli.py b/khal/cli.py
index 627fae7..978deda 100644
--- a/khal/cli.py
+++ b/khal/cli.py
@@ -298,8 +298,7 @@ def _get_cli():
for event in events:
desc = textwrap.wrap(event.long(), term_width)
event_column.extend([colored(d, event.color) for d in desc])
- click.echo('\n'.join(event_column).encode(
- ctx.obj['conf']['locale']['encoding']))
+ click.echo('\n'.join(event_column))
@cli.command()
@calendar_selector
@@ -341,7 +340,7 @@ def _get_cli():
for event in events:
desc = textwrap.wrap(event.long(), term_width)
event_column.extend([colored(d, event.color) for d in desc])
- click.echo('\n'.join(event_column).encode(ctx.obj['conf']['locale']['encoding']))
+ click.echo('\n'.join(event_column))
return cli, interactive_cli
diff --git a/khal/controllers.py b/khal/controllers.py
index 4d67d9a..be497d5 100644
--- a/khal/controllers.py
+++ b/khal/controllers.py
@@ -146,7 +146,7 @@ class Agenda(object):
term_width, _ = get_terminal_size()
event_column = get_agenda(collection, dates=date, width=term_width,
show_all_days=show_all_days, **kwargs)
- echo('\n'.join(event_column).encode(encoding))
+ echo('\n'.join(event_column))
class NewFromString(object):
diff --git a/tests/cli_test.py b/tests/cli_test.py
index ba2b93c..6666d80 100644
--- a/tests/cli_test.py
+++ b/tests/cli_test.py
@@ -68,6 +68,7 @@ path = {dbpath}
def strip_ansi_escapes(value):
+ return value
ansi_escape = re.compile(r'\x1b[^m]*m')
return ansi_escape.sub('', value)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment