Example #1
0
def upload_from_queue(flickr, queue):
    while True:
        try:
            path = queue.get_nowait()
            throttle()
            upload_file(flickr, path)
            queue.task_done()
            queue.count.next()
        except Empty:
            if queue.done: return
            sleep(3)
            continue
        except FlickrError:
            print "Flickr Error!"
            queue.put(path)
            sleep(3)
Example #2
0
def already_uploaded(flickr, path):
    digest = md5sum(path)
    throttle()
    return len(search_for_checksum(flickr, digest)) != 0