Skip to content
Permalink
Browse files
Simplifying code (h/t @Kwpolska).
  • Loading branch information
felixfontein committed Apr 14, 2017
1 parent bead455 commit c3dfe4d0f6050bc4130d31f76fd069b5ed3ac42f
Showing with 2 additions and 1 deletion.
  1. +2 −1 nikola/nikola.py
@@ -34,6 +34,7 @@
import datetime
import functools
import locale
import operator
import os
import json
import sys
@@ -2098,7 +2099,7 @@ def scan_posts(self, really=False, ignore_quit=False, quiet=False):
self.timeline = []
self.pages = []

for p in sorted(self.plugin_manager.getPluginsOfCategory('PostScanner'), key=lambda p: p.name):
for p in sorted(self.plugin_manager.getPluginsOfCategory('PostScanner'), key=operator.attrgetter('name')):
timeline = p.plugin_object.scan()
# FIXME: can there be conflicts here?
self.timeline.extend(timeline)

0 comments on commit c3dfe4d

Please sign in to comment.