class Cycler(object):
- def __init__(self, options, paths):
+ def init(self, options, paths):
self.filelist = self.find_files(options, paths)
if not self.filelist.is_empty():
error("No images were found. Exiting...")
def do_server(options, paths):
try:
try:
- cycler = Cycler(options, paths)
+ cycler = Cycler()
listener = Listener(options.socket_filename, cycler)
+ # Initialisation of Cycler delayed so we grab the socket quickly
+ cycler.init(options, paths)
asyncsched.loop()
except KeyboardInterrupt:
print