Skip to content

Commit

Permalink
Simplifying code (h/t @Kwpolska).
Browse files Browse the repository at this point in the history
  • Loading branch information
felixfontein committed Apr 14, 2017
1 parent bead455 commit c3dfe4d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/nikola.py
Expand Up @@ -34,6 +34,7 @@
import datetime
import functools
import locale
import operator
import os
import json
import sys
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c3dfe4d

Please sign in to comment.