Navigation Menu

Skip to content

Commit

Permalink
minor tweak in auto
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed May 17, 2017
1 parent 0f06b98 commit 4685933
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nikola/plugins/command/auto/__init__.py
Expand Up @@ -267,11 +267,12 @@ def do_rebuild(self, event):
# move on larger save operations for write protection
event_path = event.dest_path if hasattr(event, 'dest_path') else event.src_path
fname = os.path.basename(event_path)
from doit.tools import set_trace; set_trace()
if (fname.endswith('~') or
fname.startswith('.') or
'__pycache__' in event_path or
event_path.endswith(('.pyc', '.pyo', '.pyd', '_bak')) or
os.path.isdir(event_path)): # Skip on folders, these are usually duplicates
event.is_directory: # Skip on folders, these are usually duplicates
return
self.logger.info('REBUILDING SITE (from {0})'.format(event_path))
p = subprocess.Popen(self.cmd_arguments, stderr=subprocess.PIPE)
Expand Down

0 comments on commit 4685933

Please sign in to comment.