diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-02 09:00:13 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-02 09:00:13 -0400 |
commit | 3695cab949ccd6096f3ce1c121a909416851462c (patch) | |
tree | d3733bc17d269f98cc48bf0bf3e768453f1f2a67 | |
parent | 22d7447cede9b8eb43ab552700092b74726e8c60 (diff) |
avoid showing alert when there are no remotes to push to
-rw-r--r-- | Assistant/Threads/Pusher.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Assistant/Threads/Pusher.hs b/Assistant/Threads/Pusher.hs index 3fe85673b..ab0274db1 100644 --- a/Assistant/Threads/Pusher.hs +++ b/Assistant/Threads/Pusher.hs @@ -54,8 +54,9 @@ pushThread st dstatus commitchan pushmap = do if shouldPush now commits then do remotes <- knownRemotes <$> getDaemonStatus dstatus - void $ alertWhile dstatus (pushAlert remotes) $ - pushToRemotes thisThread now st (Just pushmap) remotes + unless (null remotes) $ + void $ alertWhile dstatus (pushAlert remotes) $ + pushToRemotes thisThread now st (Just pushmap) remotes else do debug thisThread [ "delaying push of" |