summaryrefslogtreecommitdiffhomepage
path: root/src/Xmobar/Plugins/CommandReader.hs
diff options
context:
space:
mode:
authorSibi Prabakaran <sibi@psibi.in>2020-04-30 19:56:45 +0530
committerjao <jao@gnu.org>2020-04-30 16:45:31 +0100
commita705d021a8cfbb3b9bbfbec833302768d3ad459e (patch)
tree6d52eecacdc3d2536ac83a3c6e0ca8f3f0412bd2 /src/Xmobar/Plugins/CommandReader.hs
parentb0591c5e4c483aa47ef74ab25448c56cf6e3a82a (diff)
downloadxmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.gz
xmobar-a705d021a8cfbb3b9bbfbec833302768d3ad459e.tar.bz2
Refactor the usage of hGetLineSafe
hGetLineSafe is always hGetLine and hence we can directly use it.
Diffstat (limited to 'src/Xmobar/Plugins/CommandReader.hs')
-rw-r--r--src/Xmobar/Plugins/CommandReader.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Xmobar/Plugins/CommandReader.hs b/src/Xmobar/Plugins/CommandReader.hs
index 9cf6d0e..a54377a 100644
--- a/src/Xmobar/Plugins/CommandReader.hs
+++ b/src/Xmobar/Plugins/CommandReader.hs
@@ -17,7 +17,6 @@ module Xmobar.Plugins.CommandReader(CommandReader(..)) where
import System.IO
import Xmobar.Run.Exec
-import Xmobar.System.Utils (hGetLineSafe)
import System.Process(runInteractiveCommand, getProcessExitCode)
data CommandReader = CommandReader String String
@@ -31,7 +30,7 @@ instance Exec CommandReader where
hClose hstderr
hSetBinaryMode hstdout False
hSetBuffering hstdout LineBuffering
- forever ph (hGetLineSafe hstdout >>= cb)
+ forever ph (hGetLine hstdout >>= cb)
where forever ph a =
do a
ec <- getProcessExitCode ph