From: Pavlos Ratis Date: Sat, 1 Mar 2014 17:56:15 +0000 (+0200) Subject: filter output with seed files only X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70f97d275cf7553773d685b16416c82866d3b299;p=gentoo-keys.git filter output with seed files only --- diff --git a/gkeys/actions.py b/gkeys/actions.py index 8d381db..85c0e0e 100644 --- a/gkeys/actions.py +++ b/gkeys/actions.py @@ -284,7 +284,10 @@ class Actions(object): def listseedfiles(self, args): + seedfile = [] seedsdir = self.config.get_key('seedsdir') - files = os.listdir(seedsdir) + for files in os.listdir(seedsdir): + if files.endswith('.seeds'): + seedfile.append(files) return {"Seed files found at path: %s\n %s" - % (seedsdir, "\n ".join(files)): True} + % (seedsdir, "\n ".join(seedfile)): True}