[Forensics-changes] [yara] 05/192: Added missing return statements -> yarapython documentation (#489)

Hilko Bengen bengen at moszumanska.debian.org
Sat Jul 1 10:31:40 UTC 2017


This is an automated email from the git hooks/post-receive script.

bengen pushed a commit to annotated tag v3.6.0
in repository yara.

commit 424e308d143766d8de69d419a0bb1e3bd2ecd6c8
Author: Daxda <Daxda at users.noreply.github.com>
Date:   Wed Aug 3 13:09:55 2016 +0200

    Added missing return statements -> yarapython documentation (#489)
    
    * Added missing `return` instruction
    
    The documentation for the callback function's sample code states to return `CALLBACK_CONTINUE` - but the source code doesn't return the value.
    
    * Added missing return statements
---
 docs/yarapython.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/yarapython.rst b/docs/yarapython.rst
index b8b0ffb..c59da42 100644
--- a/docs/yarapython.rst
+++ b/docs/yarapython.rst
@@ -186,7 +186,7 @@ Here is an example:
 
   def mycallback(data):
     print data
-    yara.CALLBACK_CONTINUE
+    return yara.CALLBACK_CONTINUE
 
   matches = rules.match('/foo/bar/my_file', callback=mycallback)
 
@@ -227,7 +227,7 @@ Here is an example:
 
   def modules_callback(data):
     print data
-    yara.CALLBACK_CONTINUE
+    return yara.CALLBACK_CONTINUE
 
   matches = rules.match('/foo/bar/my_file', modules_callback=modules_callback)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git



More information about the forensics-changes mailing list