Skip to content

Commit

Permalink
Version 1.15 (#43)
Browse files Browse the repository at this point in the history
* Reset stream cursor after read (#42)

---------

Co-authored-by: R. Singh <[email protected]>
  • Loading branch information
cdgriffith and Gr3atWh173 authored Feb 22, 2023
1 parent 15a93b2 commit ff042db
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 4 deletions.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ A big thank you to everyone that has helped!
- Sean Stallbaum (CSBaum)
- phithon
- Gerhard Schmidt
- R. Singh (Gr3atWh173)
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
Changelog
=========

Version 1.15
------------

- Adding fix for resetting the stream after reading part of it (thanks to R. Singh)

Version 1.14
------------

Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2013-2022 Chris Griffith
Copyright (c) 2013-2023 Chris Griffith

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ https://cgit.freedesktop.org/xdg/shared-mime-info/
License
-------

MIT Licenced, see LICENSE, Copyright (c) 2013-2022 Chris Griffith
MIT Licenced, see LICENSE, Copyright (c) 2013-2023 Chris Griffith

.. |CoverageStatus| image:: https://coveralls.io/repos/github/cdgriffith/puremagic/badge.svg?branch=develop
:target: https://coveralls.io/github/cdgriffith/puremagic?branch=develop
Expand Down
5 changes: 3 additions & 2 deletions puremagic/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
magic numbers. It is designed to be minimalistic and inherently cross platform
compatible, with no imports when used as a module.
© 2013-2022 Chris Griffith - License: MIT (see LICENSE)
© 2013-2023 Chris Griffith - License: MIT (see LICENSE)
Acknowledgements
Gary C. Kessler
Expand All @@ -20,7 +20,7 @@
from typing import Union, Tuple, List

__author__ = "Chris Griffith"
__version__ = "1.14"
__version__ = "1.15"
__all__ = [
"magic_file",
"magic_string",
Expand Down Expand Up @@ -168,6 +168,7 @@ def _stream_details(stream):
head = stream.read(max_head)
stream.seek(-max_foot, os.SEEK_END)
foot = stream.read()
stream.seek(0)
return head, foot


Expand Down

0 comments on commit ff042db

Please sign in to comment.