From: James Bunton Date: Tue, 1 Jul 2008 16:30:02 +0000 (+1000) Subject: RandomBG: Fixed FolderRandom X-Git-Url: https://code.delx.au/bg-scripts/commitdiff_plain/5e2988d945dc5b6dbb185bd8a32ac14dd0732b2f RandomBG: Fixed FolderRandom --- diff --git a/bin/randombg.py b/bin/randombg.py index d9fe0a0..57d0899 100755 --- a/bin/randombg.py +++ b/bin/randombg.py @@ -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)