Commits

Nikolaj Sjujskij committed 39bc421 Merge

Merge in `discfortune` improvements

Comments (0)

Files changed (1)

inotify_watcher.py

 @register_action('rstman')
 @page_output
 def rst2man(filename):
-    ''' File contents highlighter '''
+    ''' Render rST-file as a manpage '''
     import docutils.core
     content = docutils.core.publish_file(source_path=filename,
                                          writer_name='manpage')
                                            stdout=subprocess.PIPE)
     output, errors = nroffer.communicate(input=content)
     return output.decode('utf-8'
-                ).encode('latin1', errors='replace'
-                ).decode('utf-8', errors='replace')
+                                ).encode('latin1', errors='replace'
+                                ).decode('utf-8', errors='replace')
 
 
 def ino_watch(file_to_watch, action, action_args=[], action_kwargs={}):
     # because editors like vim do save&rename instead of simple modification
     inotifyx.add_watch(watcher, dirname, inotifyx.IN_CLOSE_WRITE)
     # wrap action to avoid code duplication
-    action_lambda = lambda dummy=None: action(file_to_watch, *action_args,
-                                                             **action_kwargs)
+    action_lambda = lambda: action(file_to_watch, *action_args, **action_kwargs)
     # run the first time
     action_lambda()
     while True: