X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=daklib%2Fgpg.py;h=865e9bd6dccc13b9b47354c510fa9c5503f2ab8c;hb=4cbcf2ec05c369e20897afb68770826468b84fdf;hp=0e080df5a6558164bb259a9b529cc2087dcfa611;hpb=190f6332b5ffb52975f352090aa9beb64c951f0b;p=dak.git diff --git a/daklib/gpg.py b/daklib/gpg.py index 0e080df5..865e9bd6 100644 --- a/daklib/gpg.py +++ b/daklib/gpg.py @@ -68,7 +68,7 @@ class SignedFile(object): def __init__(self, data, keyrings, require_signature=True, gpg="/usr/bin/gpg"): """ @param data: string containing the message - @param keyrings: seqeuence of keyrings + @param keyrings: sequence of keyrings @param require_signature: if True (the default), will raise an exception if no valid signature was found @param gpg: location of the gpg binary """ @@ -114,6 +114,10 @@ class SignedFile(object): raise GpgException("No valid signature found. (GPG exited with status code %s)\n%s" % (exit_code, self.stderr)) def _do_io(self, read, write): + for fd in write.keys(): + old = fcntl.fcntl(fd, fcntl.F_GETFL) + fcntl.fcntl(fd, fcntl.F_SETFL, old | os.O_NONBLOCK) + read_lines = dict( (fd, []) for fd in read ) write_pos = dict( (fd, 0) for fd in write )