Tue, 15 Jul 2008 10:08:16 +0200 <thp@perli.net>
Fix bugs and annoyances when no channels.opml file exists * src/gpodder/opml.py: Make sure can save a new channels.opml file when no other file exists, and make sure we don't try to parse a file that does not exist when opening OPML files git-svn-id: svn://svn.berlios.de/gpodder/trunk@775 b0d088ad-0a06-0410-aad2-9ed5178a7e87
This commit is contained in:
parent
e352cb7db2
commit
e0828d8fde
|
@ -1,3 +1,10 @@
|
||||||
|
Tue, 15 Jul 2008 10:08:16 +0200 <thp@perli.net>
|
||||||
|
Fix bugs and annoyances when no channels.opml file exists
|
||||||
|
|
||||||
|
* src/gpodder/opml.py: Make sure can save a new channels.opml file
|
||||||
|
when no other file exists, and make sure we don't try to parse a file
|
||||||
|
that does not exist when opening OPML files
|
||||||
|
|
||||||
Tue, 15 Jul 2008 10:06:19 +0200 <thp@perli.net>
|
Tue, 15 Jul 2008 10:06:19 +0200 <thp@perli.net>
|
||||||
Do not hide podcast cover and pill pixbuf in podcast list by default
|
Do not hide podcast cover and pill pixbuf in podcast list by default
|
||||||
|
|
||||||
|
|
|
@ -76,9 +76,13 @@ class Importer(object):
|
||||||
"""
|
"""
|
||||||
self.items = []
|
self.items = []
|
||||||
try:
|
try:
|
||||||
if os.path.exists( url):
|
if url.startswith('/'):
|
||||||
# assume local filename
|
# assume local filename
|
||||||
doc = xml.dom.minidom.parse( url)
|
if os.path.exists(url):
|
||||||
|
doc = xml.dom.minidom.parse( url)
|
||||||
|
else:
|
||||||
|
log('Empty/non-existing OPML file', sender=self)
|
||||||
|
return
|
||||||
else:
|
else:
|
||||||
doc = xml.dom.minidom.parseString( self.read_url( url))
|
doc = xml.dom.minidom.parseString( self.read_url( url))
|
||||||
|
|
||||||
|
@ -200,7 +204,7 @@ class Exporter(object):
|
||||||
# try to save the new file, but keep the old one so we
|
# try to save the new file, but keep the old one so we
|
||||||
# don't end up with a clobbed, empty opml file.
|
# don't end up with a clobbed, empty opml file.
|
||||||
FREE_DISK_SPACE_AFTER = 1024*512
|
FREE_DISK_SPACE_AFTER = 1024*512
|
||||||
if util.get_free_disk_space(self.filename) < 2*len(data)+FREE_DISK_SPACE_AFTER:
|
if util.get_free_disk_space(os.path.dirname(self.filename)) < 2*len(data)+FREE_DISK_SPACE_AFTER:
|
||||||
log('Not enough free disk space to save channel list to %s', self.filename, sender = self)
|
log('Not enough free disk space to save channel list to %s', self.filename, sender = self)
|
||||||
return False
|
return False
|
||||||
fp = open(self.filename+'.tmp', 'w')
|
fp = open(self.filename+'.tmp', 'w')
|
||||||
|
|
Loading…
Reference in a new issue