Skip to content

Commit

Permalink
delete unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
noO0ob committed Nov 6, 2024
1 parent a19135a commit dba7cb7
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lyrebird/settings/settings_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ def __init__(self):
self.EXAMPLE_DIR = Path(__file__).parent.parent/'examples'/'settings'
self.configs = deepcopy(application._cm.personal_config)
self.settings = application.settings
self.workspace = ''

def stop(self):
for name, setting in self.settings.items():
Expand Down Expand Up @@ -156,18 +155,18 @@ def get_settings_list(self):
workspace_str = application.config.get('settings.workspace')

if workspace_str:
self.workspace = Path(workspace_str)
if not self.workspace.expanduser().exists():
workspace = Path(workspace_str)
if not workspace.expanduser().exists():
logger.error(f'Settings scripts dir {workspace_str} not found!')
return
workspace_iterdir = self.get_iterdir_python(self.workspace)
workspace_iterdir = self.get_iterdir_python(workspace)
if not workspace_iterdir:
logger.warning(f'No settings script found in dir {workspace_str}')
return
else:
self.workspace = Path(self.SCRIPTS_DIR_TEMPLATE)
self.workspace.mkdir(parents=True, exist_ok=True)
workspace_iterdir = self.get_iterdir_python(self.workspace)
workspace = Path(self.SCRIPTS_DIR_TEMPLATE)
workspace.mkdir(parents=True, exist_ok=True)
workspace_iterdir = self.get_iterdir_python(workspace)
if not workspace_iterdir:
self.copy_example_scripts()

Expand Down

0 comments on commit dba7cb7

Please sign in to comment.