diff options
Diffstat (limited to 'src/revocation/test_local_revocation.py.in')
-rw-r--r-- | src/revocation/test_local_revocation.py.in | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/revocation/test_local_revocation.py.in b/src/revocation/test_local_revocation.py.in index 69e68a197..28257715f 100644 --- a/src/revocation/test_local_revocation.py.in +++ b/src/revocation/test_local_revocation.py.in | |||
@@ -42,6 +42,7 @@ TEST_REVOCATION_EGO = "revoc_test" | |||
42 | 42 | ||
43 | get_clean = subprocess.Popen ([config, '-c', TEST_CONFIGURATION, '-s', 'PATHS', '-o', 'GNUNET_HOME', '-f'], stdout=subprocess.PIPE) | 43 | get_clean = subprocess.Popen ([config, '-c', TEST_CONFIGURATION, '-s', 'PATHS', '-o', 'GNUNET_HOME', '-f'], stdout=subprocess.PIPE) |
44 | cleandir, x = get_clean.communicate () | 44 | cleandir, x = get_clean.communicate () |
45 | cleandir = cleandir.decode("utf-8") | ||
45 | cleandir = cleandir.rstrip ('\n').rstrip ('\r') | 46 | cleandir = cleandir.rstrip ('\n').rstrip ('\r') |
46 | 47 | ||
47 | if os.path.isdir (cleandir): | 48 | if os.path.isdir (cleandir): |
@@ -64,6 +65,7 @@ try: | |||
64 | sys.stderr.flush () | 65 | sys.stderr.flush () |
65 | idd = subprocess.Popen ([ident, '-d'], stdout=subprocess.PIPE) | 66 | idd = subprocess.Popen ([ident, '-d'], stdout=subprocess.PIPE) |
66 | rev_key, x = idd.communicate () | 67 | rev_key, x = idd.communicate () |
68 | rev_key = rev_key.decode("utf-8") | ||
67 | if len (rev_key.split ()) < 3: | 69 | if len (rev_key.split ()) < 3: |
68 | raise Exception ("can't get revocation key out of `" + rev_key + "'") | 70 | raise Exception ("can't get revocation key out of `" + rev_key + "'") |
69 | rev_key = rev_key.split ()[2] | 71 | rev_key = rev_key.split ()[2] |
@@ -73,6 +75,7 @@ try: | |||
73 | sys.stderr.flush () | 75 | sys.stderr.flush () |
74 | tst = subprocess.Popen ([revoc, '-t', rev_key, '-c', TEST_CONFIGURATION], stdout=subprocess.PIPE) | 76 | tst = subprocess.Popen ([revoc, '-t', rev_key, '-c', TEST_CONFIGURATION], stdout=subprocess.PIPE) |
75 | output_not_revoked, x = tst.communicate () | 77 | output_not_revoked, x = tst.communicate () |
78 | output_not_revoked = output_not_revoked.decode("utf-8") | ||
76 | if tst.returncode != 0: | 79 | if tst.returncode != 0: |
77 | raise Exception ("gnunet-revocation failed to test a key - " + str (tst.returncode) + ": " + output_not_revoked) | 80 | raise Exception ("gnunet-revocation failed to test a key - " + str (tst.returncode) + ": " + output_not_revoked) |
78 | if 'valid' not in output_not_revoked: | 81 | if 'valid' not in output_not_revoked: |
@@ -94,6 +97,7 @@ try: | |||
94 | sys.stderr.flush () | 97 | sys.stderr.flush () |
95 | tst = subprocess.Popen ([revoc, '-t', rev_key, '-c', TEST_CONFIGURATION], stdout=subprocess.PIPE) | 98 | tst = subprocess.Popen ([revoc, '-t', rev_key, '-c', TEST_CONFIGURATION], stdout=subprocess.PIPE) |
96 | output_revoked, x = tst.communicate () | 99 | output_revoked, x = tst.communicate () |
100 | output_revoked = output_revoked.decode("utf-8") | ||
97 | if tst.returncode != 0: | 101 | if tst.returncode != 0: |
98 | raise Exception ("gnunet-revocation failed to test a revoked key") | 102 | raise Exception ("gnunet-revocation failed to test a revoked key") |
99 | if 'revoked' not in output_revoked: | 103 | if 'revoked' not in output_revoked: |