mirror of
https://github.com/weewx/weewx.git
synced 2026-05-24 01:35:18 -04:00
Allow weewxd to run even if 'user' directory cannot be found
This commit is contained in:
@@ -238,4 +238,12 @@ def initialize(config_dict, log_label):
|
||||
# Add the 'user' package to PYTHONPATH
|
||||
add_user_path(config_dict)
|
||||
# Now we can import user.extensions
|
||||
importlib.import_module('user.extensions')
|
||||
try:
|
||||
importlib.import_module('user.extensions')
|
||||
except ModuleNotFoundError as e:
|
||||
import logging
|
||||
msg = "Cannot find 'user' directory: %s" % e
|
||||
print(msg, file=sys.stderr)
|
||||
print("Proceeding", file=sys.stderr)
|
||||
log = logging.getLogger(__name__)
|
||||
log.error(msg)
|
||||
|
||||
Reference in New Issue
Block a user