Exemplo n.º 1
0
def update_hash(src_dir, hash):
    """Hashes an entire ModelE source directory"""
    src_files = sorted(list_src_files(src_dir))
    for file in src_files:
        fname = os.path.join(src_dir, file)
        with open(fname) as fin:
            code = fin.read()
#            print('Hashing %s' % fname)
            xhash.update(code, hash)
Exemplo n.º 2
0
def update_hash(src_dir, hash):
    """Hashes an entire ModelE source directory"""
    src_files = sorted(list_src_files(src_dir))
    for file in src_files:
        fname = os.path.join(src_dir, file)
        with open(fname) as fin:
            code = fin.read()
            #            print('Hashing %s' % fname)
            xhash.update(code, hash)
Exemplo n.º 3
0
 def update_hash(self, hash):
     xhash.update(self.build, hash)
Exemplo n.º 4
0
 def update_hash(self, hash):
     xhash.update(self.sources, hash)
     xhash.update(self.components, hash)
     xhash.update(self.defines, hash)
Exemplo n.º 5
0
 def test_simple_hash(self):
     """Just tests that the hash algorithm runs"""
     hash = hashlib.md5()
     xhash.update({'a' : 5, 'b' : 4}, hash)
     xhash.update(17, hash)
     xhash.update(('foo', 'bar'), hash)
Exemplo n.º 6
0
 def update_hash(self, hash):
     xhash.update(self.build, hash)
Exemplo n.º 7
0
 def update_hash(self, hash):
     xhash.update(self.sources, hash)
     xhash.update(self.components, hash)
     xhash.update(self.defines, hash)
Exemplo n.º 8
0
def pkghash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    srcdir.update_hash(src_dir, hash)
    return hash.hexdigest()
Exemplo n.º 9
0
def buildhash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    xhash.update(src_dir, hash)    # Source directory
    return hash.hexdigest()
Exemplo n.º 10
0
def pkghash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    srcdir.update_hash(src_dir, hash)
    return hash.hexdigest()
Exemplo n.º 11
0
def buildhash(rd, src_dir):
    hash = hashlib.md5()
    xhash.update(rd, hash)
    xhash.update(src_dir, hash)  # Source directory
    return hash.hexdigest()