crash--
This commit is contained in:
parent
1bea5f5a6d
commit
80c16d3d58
@ -18,7 +18,7 @@ def list_(ctx):
|
|||||||
for plugin in sorted(repo.plugins()):
|
for plugin in sorted(repo.plugins()):
|
||||||
rows.append([
|
rows.append([
|
||||||
click.style(plugin.name, fg='green'),
|
click.style(plugin.name, fg='green'),
|
||||||
click.style(plugin.version, fg='yellow')
|
click.style(str(plugin.version), fg='yellow')
|
||||||
])
|
])
|
||||||
if len(rows) > 0:
|
if len(rows) > 0:
|
||||||
click.echo(columnar(rows, ['Plugin', 'Version'], no_borders=True))
|
click.echo(columnar(rows, ['Plugin', 'Version'], no_borders=True))
|
||||||
|
@ -126,7 +126,7 @@ def sync(ctx):
|
|||||||
click.echo("Missing plugins:")
|
click.echo("Missing plugins:")
|
||||||
for state in sorted(missing):
|
for state in sorted(missing):
|
||||||
click.echo("\t{} {}".format(click.style(state.plugin.name, fg='red'),
|
click.echo("\t{} {}".format(click.style(state.plugin.name, fg='red'),
|
||||||
click.style(state.plugin.versionSpec,
|
click.style(str(state.plugin.versionSpec),
|
||||||
fg='yellow')))
|
fg='yellow')))
|
||||||
if len(outdatedLinks) > 0 or len(available) > 0:
|
if len(outdatedLinks) > 0 or len(available) > 0:
|
||||||
click.echo("Apply changes? [y/N]", nl=False)
|
click.echo("Apply changes? [y/N]", nl=False)
|
||||||
|
@ -73,7 +73,9 @@ class UnmanagedFile(PluginState):
|
|||||||
self.filename = filename
|
self.filename = filename
|
||||||
|
|
||||||
def __lt__(self, other):
|
def __lt__(self, other):
|
||||||
|
if isinstance(other, UnmanagedFile):
|
||||||
return self.filename < other.filename
|
return self.filename < other.filename
|
||||||
|
return False
|
||||||
|
|
||||||
class OutdatedSymlink(PluginState):
|
class OutdatedSymlink(PluginState):
|
||||||
def __init__(self, plugin, currentVersion, wantedVersion):
|
def __init__(self, plugin, currentVersion, wantedVersion):
|
||||||
|
@ -10,7 +10,7 @@ class Server:
|
|||||||
self.pluginPath = self.path+'/plugins'
|
self.pluginPath = self.path+'/plugins'
|
||||||
|
|
||||||
def plugins(self):
|
def plugins(self):
|
||||||
return [PluginSpec(p['name'], p['version']) for p in self.config['plugins']]
|
return [PluginSpec(p['name'], p.get('version', '*')) for p in self.config['plugins']]
|
||||||
|
|
||||||
def add_plugin(self, pluginSpec):
|
def add_plugin(self, pluginSpec):
|
||||||
for plugin in self.config['plugins']:
|
for plugin in self.config['plugins']:
|
||||||
|
Loading…
Reference in New Issue
Block a user