Skip to content
Permalink
Browse files

fix #1809 -- handle missing pyinotify

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed Jun 11, 2015
1 parent 7ef5b68 commit b3ae34da5fcdfaa6b59a4bad491f82aa5a76f96f
Showing with 7 additions and 6 deletions.
  1. +1 −1 CHANGES.txt
  2. +6 −5 nikola/plugins/command/auto/__init__.py
@@ -13,7 +13,7 @@ Bugfixes
--------

* Handle rare gettz failure (Issue #1806)
* Handle missing ws4py better in auto plugin (Issue #1803)
* Handle missing dependencies better in auto plugin (Issues #1803, #1809)
* IDNA mixing unicode/bytes in python 3 (Issue #1802)
* Cleaner splitting of metadata in onefile posts (Issue #973)
* It's markdown extra, not extras (Issue #1799)
@@ -49,15 +49,16 @@
WebSocket = object
try:
import pyinotify
MASK = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_MODIFY
except ImportError:
pyinotify = None
MASK = None


from nikola.plugin_categories import Command
from nikola.utils import req_missing, get_logger

LRJS_PATH = os.path.join(os.path.dirname(__file__), 'livereload.js')
MASK = pyinotify.IN_DELETE | pyinotify.IN_CREATE | pyinotify.IN_MODIFY
error_signal = signal('error')
refresh_signal = signal('refresh')

@@ -115,12 +116,12 @@ def _execute(self, options, args):

self.logger = get_logger('auto', self.site.loghandlers)

if WebSocket is object:
if WebSocket is object and pyinotify is None:
req_missing(['ws4py', 'pyinotify'], 'use the "auto" command')
elif WebSocket is object:
req_missing(['ws4py'], 'use the "auto" command')
return
if pyinotify is None:
elif pyinotify is None:
req_missing(['pyinotify'], 'use the "auto" command')
return

arguments = ['build']
if self.site.configuration_filename != 'conf.py':

0 comments on commit b3ae34d

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