From a7152716e2e068c69c4ecde7f2cedeb3547a3411 Mon Sep 17 00:00:00 2001 From: Talha Mansoor Date: Sun, 11 Aug 2013 01:43:27 +0500 Subject: [PATCH] Receive the two values returned from get_instance() `get_instance()` returns two values. Old code, instead of unpacking two values in two variables, placed the tuple in a single variable `pelican`. Later in the same block when `pelican.run()` was called, it resulted in error. ``` -> Modified: content, theme, settings. re-generating... CRITICAL: ("'tuple' object has no attribute 'run'",) CRITICAL: 'tuple' object has no attribute 'run' Traceback (most recent call last): File "/Users/talha/Repos/VirtualEnvs/pelican-dev/bin/pelican", line 8, in load_entry_point('pelican==3.3', 'console_scripts', 'pelican')() File "/Users/talha/Repos/VirtualEnvs/pelican-dev/lib/python2.7/site-packages/pelican-3.3-py2.7.egg/pelican/__init__.py", line 353, in main pelican.run() ``` Either the returned value should be unpacked properly or `pelican[0].run` should be called. --- pelican/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/__init__.py b/pelican/__init__.py index 8ba79e0a..f2bd2e07 100644 --- a/pelican/__init__.py +++ b/pelican/__init__.py @@ -338,7 +338,7 @@ def main(): modified = {k: next(v) for k, v in watchers.items()} if modified['settings']: - pelican = get_instance(args) + pelican, settings = get_instance(args) if any(modified.values()): print('\n-> Modified: {}. re-generating...'.format(