Skip to content
This repository was archived by the owner on Jan 4, 2021. It is now read-only.

Commit fc71466

Browse files
author
totokaka
committed
install and update now reports why plugins are not installed/updated
1 parent 0f639fa commit fc71466

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

TODO

-1
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
- Report why plugins are removed from install queue. Eg. report when they are ignored and removed because of nonexisting versions.

mcman/commands/plugins.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -186,15 +186,22 @@ def download(self):
186186
to_install = list()
187187
for plugin in plugins:
188188
if plugin['plugin_name'].lower() in self.args.ignored:
189+
self.p_sub("Ignoring {}", plugin['plugin_name'])
190+
continue
191+
if len(plugin['versions']) < 1:
192+
self.p_sub("Could not find any versions for {}",
193+
plugin['plugin_name'])
189194
continue
190195
for i_plugin in installed:
191196
if i_plugin['slug'] == plugin['slug'] \
192197
and not i_plugin['versions'][0]['version'] > \
193198
plugin['versions'][0]['version']:
199+
self.p_sub("{} is allready installed, and up to date",
200+
plugin['plugin_name'])
194201
break
195202
else:
196203
to_install.append(plugin)
197-
plugins = [p for p in to_install if len(p['versions']) > 0]
204+
plugins = to_install
198205

199206
if len(plugins) < 1:
200207
self.p_main('No plugins left to install')
@@ -228,6 +235,8 @@ def update(self):
228235
to_update = list()
229236
for i in installed:
230237
if i['plugin_name'].lower() in self.args.ignored:
238+
self.p_sub('Ignoring {}',
239+
i['plugin_name'])
231240
continue
232241
n_version = utils.select_newest_version(i, self.args.version)
233242
if n_version is None:

0 commit comments

Comments
 (0)