diff options
Diffstat (limited to 'gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py')
-rw-r--r-- | gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py b/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py deleted file mode 100644 index da04483388..0000000000 --- a/gnuradio-runtime/python/gnuradio/gru/os_read_exactly.py +++ /dev/null @@ -1,24 +0,0 @@ -# -# Copyright 2005 Free Software Foundation, Inc. -# -# This file is part of GNU Radio -# -# SPDX-License-Identifier: GPL-3.0-or-later -# -# - -import os - -def os_read_exactly(file_descriptor, nbytes): - """ - Replacement for os.read that blocks until it reads exactly nbytes. - - """ - s = '' - while nbytes > 0: - sbuf = os.read(file_descriptor, nbytes) - if not(sbuf): - return '' - nbytes -= len(sbuf) - s = s + sbuf - return s |