gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated (dd8289771 -> 9f722a29b)


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated (dd8289771 -> 9f722a29b)
Date: Thu, 17 May 2018 15:39:08 +0200

This is an automated email from the git hooks/post-receive script.

ng0 pushed a change to branch master
in repository gnunet.

    from dd8289771 work-around for crypto bug (to be documented more)
     new 42399e298 Opportunisticly rename gnunet-chk.py to let its python 
invokation line be generated (py.in), and assume that it is not supposed to be 
installed
     new c7e032816 some 2to3 + flake8 fixes in contrib/gnunet-chk.py
     new 9f722a29b Merge branch 'master' of gnunet.org:gnunet

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 contrib/Makefile.am                         |  4 +++-
 contrib/{gnunet-chk.py => gnunet-chk.py.in} | 15 ++++++++-------
 2 files changed, 11 insertions(+), 8 deletions(-)
 rename contrib/{gnunet-chk.py => gnunet-chk.py.in} (97%)

diff --git a/contrib/Makefile.am b/contrib/Makefile.am
index 577924fab..1db5b3091 100644
--- a/contrib/Makefile.am
+++ b/contrib/Makefile.am
@@ -20,7 +20,8 @@ noinst_SCRIPTS = \
  terminate.py \
  pydiffer.py \
  gnunet_pyexpect.py \
- gnunet_janitor.py
+ gnunet_janitor.py \
+ gnunet-chk.py
 
 dist_pkgdata_DATA = \
  gns-bcd.html \
@@ -50,6 +51,7 @@ EXTRA_DIST = \
  terminate.py.in \
  gnunet_pyexpect.py.in \
  gnunet_janitor.py.in \
+ gnunet-chk.py.in \
  pydiffer.py.in \
  gnunet-gns-import.sh \
  openvpn-tap32/tapw32/tap0901.sys \
diff --git a/contrib/gnunet-chk.py b/contrib/gnunet-chk.py.in
similarity index 97%
rename from contrib/gnunet-chk.py
rename to contrib/gnunet-chk.py.in
index dba694c34..0d07e6239 100755
--- a/contrib/gnunet-chk.py
+++ b/contrib/gnunet-chk.py.in
@@ -1,6 +1,6 @@
-#!/usr/bin/python
address@hidden@
 # This file is part of GNUnet.
-# (C) 2013 Christian Grothoff (and other contributing authors)
+# (C) 2013, 2018 Christian Grothoff (and other contributing authors)
 #
 # GNUnet is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published
@@ -27,6 +27,7 @@ import os
 import getopt
 import sys
 from Crypto.Cipher import AES
+from functools import reduce
 
 
 # Defaults
@@ -76,7 +77,7 @@ def encode_data_to_string(data):
         wpos += 1
         vbit -= 5
     assert (0 == vbit)
-    return out;
+    return out
 
 
 def sha512_hash(data):
@@ -105,7 +106,7 @@ class AESKey:
         passphrase: string containing the passphrase to get the AES key and
         initialization vector
         """
-        passphrase = bytearray(passphrase);
+        passphrase = bytearray(passphrase)
         self.key = bytearray(self.KEY_SIZE)
         self.iv = bytearray(self.IV_SIZE)
         if (len(passphrase) > self.KEY_SIZE):
@@ -284,7 +285,7 @@ def compute_rootchk(readin, size):
     readin: the stream where to read data from
     size: the size of data to be read
     """
-    depth = compute_depth_(size);
+    depth = compute_depth_(size)
     current_depth = 0
     chks = [None] * (depth * CHK_PER_INODE)  # list buffer
     read_offset = 0
@@ -294,13 +295,13 @@ def compute_rootchk(readin, size):
             off = CHK_PER_INODE * (depth - 1)
             assert (chks[off] is not None)
             logging.debug("Encoding done, reading CHK `" + chks[off].query + \
-                              "' from " + repr(off) + "\n")
+                          "' from " + repr(off) + "\n")
             uri_chk = chks[off]
             assert (size == read_offset)
             uri_chk.setSize(size)
             return uri_chk
         if (0 == current_depth):
-            pt_size = min(DBLOCK_SIZE, size - read_offset);
+            pt_size = min(DBLOCK_SIZE, size - read_offset)
             try:
                 pt_block = readin.read(pt_size)
             except IOError:

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]