summaryrefslogtreecommitdiff
path: root/contrib/scripts/gnunet_pyexpect.py.in
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-10-12 18:16:07 +0000
committerng0 <ng0@n0.is>2019-10-12 18:16:07 +0000
commita5f5e7ed9b07b902af4438d76087e034abcba9b2 (patch)
tree6f376f93f1c785103d0b30f54311a0f61d2bdced /contrib/scripts/gnunet_pyexpect.py.in
parent8e827de2a1db34dfe15f5f9da2850ca469b5ecc3 (diff)
format python
Diffstat (limited to 'contrib/scripts/gnunet_pyexpect.py.in')
-rw-r--r--contrib/scripts/gnunet_pyexpect.py.in20
1 files changed, 15 insertions, 5 deletions
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 <http://www.gnu.org/licenses/>.
#
@@ -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':