Skip to content

Commit

Permalink
Update example in yara-python's documentation.
Browse files Browse the repository at this point in the history
As discussed in VirusTotal/yara-python#247, the example using `StringIO` worked fine in Python 2, but ti doesn't work in Python 3. Now that Python 2 is mostly dead, update the example.
  • Loading branch information
plusvic committed Feb 29, 2024
1 parent 2e2cd20 commit a1883ad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/yarapython.rst
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,9 @@ example, you can save your rules to a memory buffer with this code:
.. code-block:: python
import StringIO
import io
buff = StringIO.StringIO()
buff = io.BytesIO()
rules.save(file=buff)
The saved rules can be loaded from the memory buffer:
Expand Down

0 comments on commit a1883ad

Please sign in to comment.