]> code.delx.au - bg-scripts/commitdiff
RandomBG: Fixed FolderRandom
authorJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 16:30:02 +0000 (02:30 +1000)
committerJames Bunton <jamesbunton@delx.net.au>
Tue, 1 Jul 2008 16:30:02 +0000 (02:30 +1000)
bin/randombg.py

index d9fe0a0f08f4a235c08eacf9a18ed41546cfac9e..57d08991ebea778ff113cc275060cabd074f4859 100755 (executable)
@@ -162,13 +162,16 @@ class FolderRandomFileList(BaseFileList):
        def __init__(self):
                self.directories = {}
        
+       def scan_paths(self):
+               pass
+       
        def add_path(self, path):
                debug('Added path "%s" to the list' % path)
                for dirpath, dirs, filenames in os.walk(path):
                        debug('Scanning "%s" for images' % dirpath)
                        if self.directories.has_key(dirpath):
                                continue
-                       filenames = filter_images(filenames)
+                       filenames = list(filter_images(filenames))
                        if len(filenames):
                                self.directories[dirpath] = filenames
                                debug('Adding "%s" to "%s"' % (filenames, dirpath))
@@ -360,10 +363,8 @@ def main():
 
        if options.verbose == 1:
                logging.getLogger().setLevel(logging.INFO)
-               print "INFO"
        elif options.verbose >= 2:
                logging.getLogger().setLevel(logging.DEBUG)
-               print "DEBUG"
 
        if os.path.exists(options.socket_filename):
                do_client(options, args)