projects
/
hooke.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4de93a9
)
(libhooke.py) fixed crash when saving playlist with wrong path
author
devicerandom
<devnull@localhost>
Tue, 24 Feb 2009 10:53:51 +0000
(10:53 +0000)
committer
devicerandom
<devnull@localhost>
Tue, 24 Feb 2009 10:53:51 +0000
(10:53 +0000)
libhooke.py
patch
|
blob
|
history
diff --git
a/libhooke.py
b/libhooke.py
index f26b89a420b13a9cf490ce2ce498d60cc68d97b6..25ee935ab3652f44c585906fed491344aabbaff0 100755
(executable)
--- a/
libhooke.py
+++ b/
libhooke.py
@@
-124,8
+124,13
@@
class PlaylistXML:
def save(self,output_filename):
'''
saves the playlist in a XML file.
- '''
- outfile=file(output_filename,'w')
+ '''
+ try:
+ outfile=file(output_filename,'w')
+ except IOError:
+ print 'libhooke.py : Cannot save playlist. Wrong path or filename'
+ return
+
self.playlist.writexml(outfile,indent='\n')
outfile.close()