From a5f5e7ed9b07b902af4438d76087e034abcba9b2 Mon Sep 17 00:00:00 2001 From: ng0 Date: Sat, 12 Oct 2019 18:16:07 +0000 Subject: format python --- contrib/scripts/gnunet_pyexpect.py.in | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) (limited to 'contrib/scripts/gnunet_pyexpect.py.in') diff --git a/contrib/scripts/gnunet_pyexpect.py.in b/contrib/scripts/gnunet_pyexpect.py.in index 188436f51..48f8acdc1 100644 --- a/contrib/scripts/gnunet_pyexpect.py.in +++ b/contrib/scripts/gnunet_pyexpect.py.in @@ -11,7 +11,7 @@ # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Affero General Public License for more details. -# +# # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . # @@ -27,7 +27,7 @@ import shutil import time -class pexpect (object): +class pexpect(object): def __init__(self): super(pexpect, self).__init__() @@ -54,12 +54,22 @@ class pexpect (object): if len(stream) == 0: return True else: - print("Failed to find `{1}' in {0}, which is `{2}' ({3})".format(s, r, stream, len(stream))) + print( + "Failed to find `{1}' in {0}, which is `{2}' ({3})". + format(s, r, stream, len(stream)) + ) sys.exit(2) - raise ValueError("Argument `r' should be an instance of re.RegexObject or a special string, but is `{0}'".format(r)) + raise ValueError( + "Argument `r' should be an instance of re.RegexObject or a special string, but is `{0}'" + .format(r) + ) m = r.search(stream.decode(), flags) if not m: - print("Failed to find `{1}' in {0}, which is is `{2}'".format(s, r.pattern, stream)) + print( + "Failed to find `{1}' in {0}, which is is `{2}'".format( + s, r.pattern, stream + ) + ) sys.exit(2) stream = stream[m.end():] if s == 'stdout': -- cgit v1.2.3