mirror of
https://gitee.com/sui-feng-cb/AzurLaneAutoScript1
synced 2026-03-17 06:25:25 +08:00
Fix: Catch errors and show info
- No attribute ui_current, if start from unsupported page - ModuleNotFoundError, if map file not exists - ModuleNotFoundError, if run daily_ab on SP map
This commit is contained in:
@@ -44,7 +44,12 @@ class CampaignRun(CampaignUI, Reward):
|
||||
if folder.startswith('event'):
|
||||
self.stage = name
|
||||
|
||||
self.module = importlib.import_module('.' + name, f'campaign.{folder}')
|
||||
try:
|
||||
self.module = importlib.import_module('.' + name, f'campaign.{folder}')
|
||||
except ModuleNotFoundError:
|
||||
logger.warning(f'Map file not found: campaign.{folder}.{name}')
|
||||
exit(1)
|
||||
|
||||
config = copy.copy(self.config).merge(self.module.Config())
|
||||
device = copy.copy(self.device)
|
||||
device.config = config
|
||||
|
||||
Reference in New Issue
Block a user