summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorjoe <joe@jerkface.net>2016-08-29 22:42:14 -0400
committerjoe <joe@jerkface.net>2016-08-29 22:42:14 -0400
commitd9051838d4faf46c7125e949a1ac10823a768ab8 (patch)
tree67f83d17321f2d463fc2c2de4612183d6130bbe0 /lib
parent78c2c3753e69818aa7fd5d3a0354fea5d0fc452b (diff)
Removed redundant "Packet" from output of packet.
Diffstat (limited to 'lib')
-rw-r--r--lib/KeyRing.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/KeyRing.hs b/lib/KeyRing.hs
index 84d484d..c7fcebc 100644
--- a/lib/KeyRing.hs
+++ b/lib/KeyRing.hs
@@ -1983,7 +1983,7 @@ ifSecret _ t f = f
1983showPacket :: Packet -> String 1983showPacket :: Packet -> String
1984showPacket p | isKey p = (if is_subkey p 1984showPacket p | isKey p = (if is_subkey p
1985 then showPacket0 p 1985 then showPacket0 p
1986 else ifSecret p "----Secret-----" "----Public-----") 1986 else ifSecret p "---Secret" "---Public")
1987 ++ " "++fingerprint p 1987 ++ " "++fingerprint p
1988 ++ " "++show (key_algorithm p) 1988 ++ " "++show (key_algorithm p)
1989 ++ case key_nbits p of { 0 -> ""; n -> "("++show n++")" } 1989 ++ case key_nbits p of { 0 -> ""; n -> "("++show n++")" }
@@ -2004,7 +2004,12 @@ showPacket p | isKey p = (if is_subkey p
2004 xs = hashed_subpackets p 2004 xs = hashed_subpackets p
2005 2005
2006 2006
2007showPacket0 p = concat . take 1 $ words (show p) 2007showPacket0 p = dropSuffix "Packet" . concat . take 1 $ words (show p)
2008 where
2009 dropSuffix :: String -> String -> String
2010 dropSuffix _ [] = ""
2011 dropSuffix suff (x:xs) | (x:xs)==suff = ""
2012 | otherwise = x:dropSuffix suff xs
2008 2013
2009 2014
2010-- | returns Just True so as to indicate that 2015-- | returns Just True so as to indicate that