Skip to content

Commit

Permalink
Merge pull request #96 from jake1164/master
Browse files Browse the repository at this point in the history
Merged milestone .23 changes into branch
  • Loading branch information
jake1164 authored Jul 30, 2016
2 parents 2540832 + 0c49a26 commit 9d7d8b4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
0.23
====
- opml file import will fail with non-ascii characters in title. #94
0.22
====
- Fixed processor 100% utilization issue. #91
Expand Down
14 changes: 10 additions & 4 deletions manage_feeds.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,12 +320,18 @@ def import_opml_file(self, filename):
tree = et.parse(filename)
root = tree.getroot()
for outline in root.findall(".//outline[@type='rss']"):
url = outline.attrib.get('xmlUrl', '').decode('utf-8')
# for now just ignore feed title decoding issues.
try:
title = outline.attrib.get('text', '').decode('utf-8').encode('ascii', 'ignore')
except:
title = ""
new_feeds.append([
outline.attrib.get('xmlUrl', '').decode('utf-8'),
outline.attrib.get('text', '').decode('utf-8').encode('ascii', 'ignore'),
False])
url,
title,
False])
except Exception as e:
dialog = Gtk.MessageDialog(self, 0,
dialog = Gtk.MessagseDialog(self, 0,
Gtk.MessageType.ERROR,
Gtk.ButtonsType.CANCEL,
"Failed to import OPML")
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"mockturtl <[email protected]>",
"Jason Jackson <[email protected]>"
],
"version": 0.22,
"version": 0.23,
"url": "jonbrettdev.wordpress.com",
"max-instanceso": "10"
}

0 comments on commit 9d7d8b4

Please sign in to comment.