adjust line endings depending on invocation
All checks were successful
Test / Test (push) Successful in 1m45s
All checks were successful
Test / Test (push) Successful in 1m45s
This commit is contained in:
parent
498defc003
commit
d729d69ea3
@ -16,6 +16,7 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
import io
|
||||
import logging
|
||||
import sys
|
||||
|
||||
@ -42,6 +43,15 @@ class Console():
|
||||
self.pluginloader = PluginLoader(self)
|
||||
self.pluginloader.load_plugins()
|
||||
|
||||
# Configure stdin and stdout newlines and encoding
|
||||
# when invoked by ax25:
|
||||
if not sys.stdin.isatty():
|
||||
sys.stdout = io.TextIOWrapper(sys.stdout.detach(),
|
||||
newline=None)
|
||||
|
||||
sys.stdin = io.TextIOWrapper(sys.stdin.detach(),
|
||||
newline=None)
|
||||
|
||||
#
|
||||
# Input and output
|
||||
#
|
||||
|
||||
Loading…
Reference in New Issue
Block a user