diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Propellor/Property/Gpg.hs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Propellor/Property/Gpg.hs b/src/Propellor/Property/Gpg.hs index 59448bca..34c077bb 100644 --- a/src/Propellor/Property/Gpg.hs +++ b/src/Propellor/Property/Gpg.hs @@ -45,13 +45,9 @@ dotDir (User u) = do hasPrivKey :: GpgKeyId -> User -> IO Bool hasPrivKey (GpgKeyId keyid) (User u) = do value <- catchMaybeIO $ readProcess "su" ["-c", "gpg --list-secret-keys " ++ keyid, u] - return $ case value of - Just _ -> True - _ -> False + return $ isJust value hasPubKey :: GpgKeyId -> User -> IO Bool hasPubKey (GpgKeyId keyid) (User u) = do value <- catchMaybeIO $ readProcess "su" ["-c", "gpg --list-public-keys " ++ keyid, u] - return $ case value of - Just _ -> True - _ -> False + return $ isJust value |
