diff options
author | Christian Grothoff <christian@grothoff.org> | 2015-06-03 21:29:38 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2015-06-03 21:29:38 +0000 |
commit | 910c86036fb29b8e05f57ffc0cdc5e426c231ca9 (patch) | |
tree | 4cacc6e47fc5ef7b94e329a7192a38b5f7fa7c32 | |
parent | ae6b210d4e467c7ece9df7659a87bd4688ff5ab2 (diff) | |
download | gnunet-910c86036fb29b8e05f57ffc0cdc5e426c231ca9.tar.gz gnunet-910c86036fb29b8e05f57ffc0cdc5e426c231ca9.zip |
-improve Python3 compatibility
-rw-r--r-- | contrib/gnunet_pyexpect.py.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/gnunet_pyexpect.py.in b/contrib/gnunet_pyexpect.py.in index 9e5c83fa3..f8b7cc88f 100644 --- a/contrib/gnunet_pyexpect.py.in +++ b/contrib/gnunet_pyexpect.py.in | |||
@@ -56,7 +56,7 @@ class pexpect (object): | |||
56 | print ("Failed to find `{1}' in {0}, which is `{2}' ({3})".format (s, r, stream, len (stream))) | 56 | print ("Failed to find `{1}' in {0}, which is `{2}' ({3})".format (s, r, stream, len (stream))) |
57 | sys.exit (2) | 57 | sys.exit (2) |
58 | raise ValueError ("Argument `r' should be an instance of re.RegexObject or a special string, but is `{0}'".format (r)) | 58 | raise ValueError ("Argument `r' should be an instance of re.RegexObject or a special string, but is `{0}'".format (r)) |
59 | m = r.search (stream, flags) | 59 | m = r.search (stream.decode(), flags) |
60 | if not m: | 60 | if not m: |
61 | print ("Failed to find `{1}' in {0}, which is is `{2}'".format (s, r.pattern, stream)) | 61 | print ("Failed to find `{1}' in {0}, which is is `{2}'".format (s, r.pattern, stream)) |
62 | sys.exit (2) | 62 | sys.exit (2) |