# You should have received a copy of the GNU General Public License
# along with sima. If not, see <http://www.gnu.org/licenses/>.
#
-# pylint: disable=bad-continuation
"""
Deal with configuration and data files.
},
'lastfm': {
'queue_mode': "track", # TODO control values
- 'max_art': 10,
+ 'max_art': 20,
'single_album': False,
'track_to_add': 1,
'album_to_add': 1,
self.supersedes_config_with_cmd_line_options()
# set dbfile
self.config['sima']['db_file'] = join(self.config['sima']['var_dir'], 'sima.db')
- # Controls files access
- self.control_facc()
-
# Create directories
data_dir = self.config['sima']['var_dir']
if not isdir(data_dir):
makedirs(data_dir)
chmod(data_dir, 0o700)
+ # Controls files access
+ self.control_facc()
+
def control_facc(self):
"""Controls file access.
This is relevant only for file provided through the configuration file
self.log.debug('file permission is: %o', mode)
if mode & S_IRWXO or mode & S_IRWXG:
self.log.warning('File is readable by "other" and/or' +
- ' "group" (actual permission %o octal).' %
- mode)
- self.log.warning('Consider setting permissions' +
- ' to 600 octal.')
+ ' "group" (actual permission %o octal).', mode)
+ self.log.warning('Consider setting permissions to 600 octal.')
def supersedes_config_with_cmd_line_options(self):
"""Updates defaults settings with command line options"""