mirror of
https://github.com/beetbox/beets.git
synced 2025-12-30 04:22:40 +01:00
allow the import log path to be None
This commit is contained in:
parent
123189b393
commit
392f9861e0
2 changed files with 6 additions and 3 deletions
|
|
@ -622,9 +622,8 @@ def import_files(lib, paths, query):
|
|||
raise ui.UserError("can't be both quiet and timid")
|
||||
|
||||
# Open the log.
|
||||
logpath = config['import']['log'].as_filename()
|
||||
if logpath:
|
||||
logpath = normpath(logpath)
|
||||
if config['import']['log'].get() is not None:
|
||||
logpath = config['import']['log'].as_filename()
|
||||
try:
|
||||
logfile = open(syspath(logpath), 'a')
|
||||
except IOError:
|
||||
|
|
|
|||
|
|
@ -319,6 +319,10 @@ class ConfigView(object):
|
|||
is relative to the current working directory.
|
||||
"""
|
||||
path, source = self.first()
|
||||
if not isinstance(path, BASESTRING):
|
||||
raise ConfigTypeError('{0} must be a filename, not {1}'.format(
|
||||
self.name, type(path).__name__
|
||||
))
|
||||
path = os.path.expanduser(STRING(path))
|
||||
|
||||
if source.default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue