From 09c6353129681ca84f6af3fb8008f55707d08ffb Mon Sep 17 00:00:00 2001 From: vintitres Date: Mon, 1 Oct 2012 15:44:33 +0200 Subject: [PATCH] Unicode excludes fix --- gnome-shell-google-calendar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnome-shell-google-calendar.py b/gnome-shell-google-calendar.py index 9e2f60e..4c0c81d 100755 --- a/gnome-shell-google-calendar.py +++ b/gnome-shell-google-calendar.py @@ -1,5 +1,6 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import codecs import sys import getopt import time as ptime @@ -240,7 +241,7 @@ def scheduler(self, timeout): def get_excludes(self, filename): '''Gets a list of calendars to exclude''' - with open(filename, 'r') as fp: + with codecs.open(filename, 'r', 'utf-8') as fp: return frozenset(line.strip() for line in fp) def get_calendars(self):