Skip to content
Permalink
Browse files

Coil compatibility

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 9, 2015
1 parent e0af05b commit 5e832c273243cbf25596f81911b2bb0db47c8325
Showing with 11 additions and 3 deletions.
  1. +2 −1 nikola/plugins/command/orphans.py
  2. +9 −2 nikola/utils.py
@@ -41,5 +41,6 @@ class CommandOrphans(Command):
Output contains filenames only (it is passable to `xargs rm` or the like)."""

def _execute(self, options, args):
orphans = real_scan_files(self.site)[0]
l = self._doitargs['cmds'].get_plugin('list')(config=self.config, **self._doitargs)
orphans = real_scan_files(l, self.site)[0]
print('\n'.join([p for p in orphans if not os.path.isdir(p)]))
@@ -1311,7 +1311,11 @@ def __init__(self, main, config, doitargs):
self._main = main
self._config = config
self._doitargs = doitargs
for k, v in self._doitargs['cmds'].to_dict().items():
try:
cmdict = self._doitargs['cmds'].to_dict()
except AttributeError: # not a doit PluginDict
cmdict = self._doitargs['cmds']
for k, v in cmdict.items():
# cleanup: run is doit-only, init is useless in an existing site
if k in ['run', 'init']:
continue
@@ -1342,7 +1346,10 @@ def _run(self, cmd_args):
def _run_with_kw(self, cmd, *a, **kw):
# cyclic import hack
from nikola.plugin_categories import Command
cmd = self._doitargs['cmds'].get_plugin(cmd)
try:
cmd = self._doitargs['cmds'].get_plugin(cmd)
except AttributeError: # not a doit PluginDict
cmd = self._doitargs['cmds'][cmd]
try:
opt = cmd.get_options()
except TypeError:

0 comments on commit 5e832c2

Please sign in to comment.
You can’t perform that action at this time.