filter output with seed files only
authorPavlos Ratis <dastergon@gentoo.org>
Sat, 1 Mar 2014 17:56:15 +0000 (19:56 +0200)
committerPavlos Ratis <dastergon@gentoo.org>
Sat, 1 Mar 2014 17:56:15 +0000 (19:56 +0200)
gkeys/actions.py

index 8d381dbfd3b48f043d8dfcbd68dbedc73ce842af..85c0e0ebad1aa40f98d77d60fccb3bb681c331de 100644 (file)
@@ -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}