From 25637ef50ea991791a64a784e0cd3991386e28bd Mon Sep 17 00:00:00 2001 From: Isis Lovecruft Date: Sat, 11 May 2013 18:34:28 +0000 Subject: [PATCH] PEP-8ify a couple lines that were running off the screen. * Also, change a logger string to say 'GnuPG' instead of the binary's name 'gpg'. --- gnupg/util.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnupg/util.py b/gnupg/util.py index a4ddcfe..f07026b 100644 --- a/gnupg/util.py +++ b/gnupg/util.py @@ -95,14 +95,16 @@ def _copy_data(instream, outstream): if len(data) == 0: break sent += len(data) - logger.debug("_copy_data(): sending chunk (%d):\n%s" % (sent, data[:256])) + logger.debug("_copy_data(): sending chunk (%d):\n%s" + % (sent, data[:256])) try: outstream.write(data) except UnicodeError: try: outstream.write(data.encode(enc)) except IOError: - logger.exception('_copy_data(): Error sending data: Broken pipe') + logger.exception( + '_copy_data(): Error sending data: Broken pipe') break except IOError: # Can get 'broken pipe' errors even when all data was sent @@ -161,7 +163,7 @@ def _find_binary(binary=None): except IndexError as ie: logger.debug(ie.message) if binary is None: try: binary = _which('gpg')[0] - except IndexError: raise RuntimeError("gpg is not installed") + except IndexError: raise RuntimeError("GnuPG is not installed!") try: assert os.path.isabs(binary), "Path to gpg binary not absolute" assert not os.path.islink(binary), "Path to gpg binary is symlink"