From: devicerandom Date: Tue, 24 Feb 2009 10:53:51 +0000 (+0000) Subject: (libhooke.py) fixed crash when saving playlist with wrong path X-Git-Tag: 0.9.0~51 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5312e9cdacf5ea8da3b692cd7e7ea1fa39a0ce95;p=hooke.git (libhooke.py) fixed crash when saving playlist with wrong path --- diff --git a/libhooke.py b/libhooke.py index f26b89a..25ee935 100755 --- 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()