From a705d021a8cfbb3b9bbfbec833302768d3ad459e Mon Sep 17 00:00:00 2001 From: Sibi Prabakaran Date: Thu, 30 Apr 2020 19:56:45 +0530 Subject: Refactor the usage of hGetLineSafe hGetLineSafe is always hGetLine and hence we can directly use it. --- src/Xmobar/Run/Command.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Xmobar/Run') diff --git a/src/Xmobar/Run/Command.hs b/src/Xmobar/Run/Command.hs index e6153c1..430d142 100644 --- a/src/Xmobar/Run/Command.hs +++ b/src/Xmobar/Run/Command.hs @@ -20,8 +20,7 @@ module Xmobar.Run.Command where import Control.Exception (handle, SomeException(..)) import System.Process import System.Exit -import System.IO (hClose) -import Xmobar.System.Utils (hGetLineSafe) +import System.IO (hClose, hGetLine) import Xmobar.Run.Exec @@ -47,7 +46,7 @@ instance Exec Command where exit <- waitForProcess p let closeHandles = hClose o >> hClose i >> hClose e getL = handle (\(SomeException _) -> return "") - (hGetLineSafe o) + (hGetLine o) case exit of ExitSuccess -> do str <- getL closeHandles -- cgit v1.2.3