Merge pull request #512 from Serene-Arc/bug_fix_510
This commit is contained in:
commit
3040a35306
|
@ -184,7 +184,8 @@ class RedditConnector(metaclass=ABCMeta):
|
||||||
logger.debug(f'Loading configuration from {path}')
|
logger.debug(f'Loading configuration from {path}')
|
||||||
break
|
break
|
||||||
if not self.config_location:
|
if not self.config_location:
|
||||||
self.config_location = list(importlib.resources.path('bdfr', 'default_config.cfg').gen)[0]
|
with importlib.resources.path('bdfr', 'default_config.cfg') as path:
|
||||||
|
self.config_location = path
|
||||||
shutil.copy(self.config_location, Path(self.config_directory, 'default_config.cfg'))
|
shutil.copy(self.config_location, Path(self.config_directory, 'default_config.cfg'))
|
||||||
if not self.config_location:
|
if not self.config_location:
|
||||||
raise errors.BulkDownloaderException('Could not find a configuration file to load')
|
raise errors.BulkDownloaderException('Could not find a configuration file to load')
|
||||||
|
|
Loading…
Reference in a new issue