diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-03-01 15:27:57 +0000 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2014-03-01 15:27:57 +0000 |
commit | d314cf6828399c3b89464d4edb1e996399931828 (patch) | |
tree | e807ded07e91a4e5362b408c56e5d19a24d3a566 | |
parent | c3295231b072e12656426bb7d5eb04672b2cc3ab (diff) | |
download | python-fastimport-git-d314cf6828399c3b89464d4edb1e996399931828.tar.gz |
Remove binary_stream helper.
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | fastimport/helpers.py | 19 |
2 files changed, 2 insertions, 20 deletions
@@ -1,7 +1,8 @@ 0.9.3 UNRELEASED * Remove unused and untested helper single_plural, - invert_dict, invert_dictset and defines_to_dict. + invert_dict, invert_dictset, defines_to_dict and + binary_stream. (Jelmer Vernooij) 0.9.2 2012-04-03 diff --git a/fastimport/helpers.py b/fastimport/helpers.py index b30a779..a236b7d 100644 --- a/fastimport/helpers.py +++ b/fastimport/helpers.py @@ -29,25 +29,6 @@ def common_path(path1, path2): return ''.join(_common_path_and_rest(path1, path2)[0]) -def binary_stream(stream): - """Ensure a stream is binary on Windows. - - :return: the stream - """ - try: - import os - if os.name == 'nt': - fileno = getattr(stream, 'fileno', None) - if fileno: - no = fileno() - if no >= 0: # -1 means we're working as subprocess - import msvcrt - msvcrt.setmode(no, os.O_BINARY) - except ImportError: - pass - return stream - - def common_directory(paths): """Find the deepest common directory of a list of paths. |