From bd76f7ffc60af87d4311de128c81024223fa99ad Mon Sep 17 00:00:00 2001 From: Louis Date: Wed, 2 Apr 2014 16:34:21 +0200 Subject: [PATCH] Suppression de code inutile concernant les langues --- songbook_core/build.py | 2 +- songbook_core/songs.py | 9 ++------- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/songbook_core/build.py b/songbook_core/build.py index f81f00ab..208e04f9 100644 --- a/songbook_core/build.py +++ b/songbook_core/build.py @@ -90,7 +90,7 @@ class Songbook(object): '*.sg', ) ] - self.songslist = SongsList(self.config['datadir'], self.config["lang"]) + self.songslist = SongsList(self.config['datadir']) self.songslist.append_list(self.config['songs']) # Ensure self.config['authwords'] contains all entries diff --git a/songbook_core/songs.py b/songbook_core/songs.py index ed047e8c..1aec8aa0 100644 --- a/songbook_core/songs.py +++ b/songbook_core/songs.py @@ -88,9 +88,8 @@ def unprefixed_title(title, prefixes): class SongsList(object): """Manipulation et traitement de liste de chansons""" - def __init__(self, library, language): + def __init__(self, library): self._songdir = os.path.join(library, 'songs') - self._language = language # Liste triée des chansons self.songs = [] @@ -128,8 +127,4 @@ class SongsList(object): def languages(self): """Renvoie la liste des langues utilisées par les chansons""" - languages = set().union(*[set(song.languages) for song in self.songs]) - if languages: - return languages - else: - return set(['english']) + return set().union(*[set(song.languages) for song in self.songs])