Skip to content

Commit

Permalink
Fix New Plugin Install
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky4546 committed Apr 2, 2023
1 parent 8c93625 commit 7915254
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/common/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

import lib.common.exceptions as exceptions

VERSION = '0.9.11.07'
VERSION = '0.9.11.08'
CABERNET_URL = 'https://github.com/cabernetwork/cabernet'
CABERNET_ID = 'cabernet'
CABERNET_REPO = 'manifest.json'
Expand Down
8 changes: 4 additions & 4 deletions lib/plugins/plugin_obj.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,14 +143,14 @@ def enable_instance(self, _namespace, _instance):
if self.config_obj.data.get(name_config):
if self.config_obj.data.get(instance_config):
if not self.config_obj.data[instance_config]['enabled']:
self.logger.notice('1. Enabling {}:{} plugin instance. Required by {}. Restart Required'
self.logger.warning('1. Enabling {}:{} plugin instance. Required by {}. Restart Required'
.format(_namespace, _instance, self.namespace))
self.config_obj.write(
instance_config, 'enabled', True)
raise exceptions.CabernetException('{} plugin requested by {}. Restart Required'
.format(_namespace, self.namespace))
else:
self.logger.notice('2. Enabling {}:{} plugin instance. Required by {}. Restart Required'
self.logger.warning('2. Enabling {}:{} plugin instance. Required by {}. Restart Required'
.format(_namespace, _instance, self.namespace))
self.config_obj.write(
instance_config, 'Label', _namespace + ' Instance')
Expand All @@ -164,13 +164,13 @@ def enable_instance(self, _namespace, _instance):
raise exceptions.CabernetException('Requested Plugin {} by {} Missing'
.format(_namespace, self.namespace))
if _namespace not in self.plugins.keys():
self.logger.notice('{}:{} not installed and requested by {} settings. Restart Required'
self.logger.warning('{}:{} not installed and requested by {} settings. Restart Required'
.format(_namespace, _instance, self.namespace))
raise exceptions.CabernetException('{}:{} not enabled and requested by {} settings. Restart Required'
.format(_namespace, _instance, self.namespace))

if not self.plugins[_namespace].enabled:
self.logger.notice('{}:{} not enabled and requested by {} settings. Restart Required'
self.logger.warning('{}:{} not enabled and requested by {} settings. Restart Required'
.format(_namespace, _instance, self.namespace))
raise exceptions.CabernetException('{}:{} not enabled and requested by {} settings. Restart Required'
.format(_namespace, _instance, self.namespace))
Expand Down
1 change: 1 addition & 0 deletions lib/plugins/repo_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ def update_plugins(self, _repo_settings):
plugin['version']['installed'] = False
plugin['version']['latest'] = plugin['version']['current']
plugin['version']['current'] = None
plugin['external'] = True
self.cache_thumbnails(plugin)
self.plugin_db.save_plugin(plugin)

Expand Down

0 comments on commit 7915254

Please sign in to comment.