test fixes

This commit is contained in:
Philip Ridout 2017-08-02 07:09:38 +01:00
parent 17fb6ba835
commit e787896931
5 changed files with 11 additions and 10 deletions

View File

@ -773,7 +773,7 @@ def get_soup_for_bible_ref(reference_url, header=None, pre_parse_regex=None, pre
return None
try:
page = get_web_page(reference_url, header, True)
except:
except Exception as e:
page = None
if not page:
send_error_message('download')

View File

@ -533,7 +533,8 @@ class SongMediaItem(MediaManagerItem):
'copy', 'For song cloning'))
# Copy audio files from the old to the new song
if len(old_song.media_files) > 0:
save_path = os.path.join(str(AppLocation.get_section_data_path(self.plugin.name)), 'audio', str(new_song.id))
save_path = os.path.join(
str(AppLocation.get_section_data_path(self.plugin.name)), 'audio', str(new_song.id))
check_directory_exists(save_path)
for media_file in old_song.media_files:
new_media_file_name = os.path.join(save_path, os.path.basename(media_file.file_name))