On Tue, 2009-04-07 at 08:44 +1000, r-w wrote: > If no internet connection: > if have files: > run anyway, with warning > else: > ERROR > else: > if error getting hash/files: > if have files: > run anyway, with warning > else: > ERROR > else: > run > -- > http://mail.python.org/mailman/listinfo/python-list >
import logging def run_with_files(files): if files: logging.warn("warning") run() else: logging.error("error") raise IOError if internet_connection() and got_hash(): run() else: run_with_files(files) -- http://mail.python.org/mailman/listinfo/python-list