'Shut everything down and clean up temporary files, etc.'

def cleanup(self):

    common.log('OnionShare', 'cleanup')
    for filename in self.cleanup_filenames:
        if os.path.isfile(filename):
            os.remove(filename)
        elif os.path.isdir(filename):
            shutil.rmtree(filename)
    self.cleanup_filenames = []
