dbrtools/dbr/dbrbaseline.py
changeset 203 e274d29c8bc9
parent 200 12422144aae1
equal deleted inserted replaced
202:f6ae410bd493 203:e274d29c8bc9
   133         dbrutils.gethashes(env, file, False)
   133         dbrutils.gethashes(env, file, False)
   134     return env
   134     return env
   135 
   135 
   136 
   136 
   137 def readzippeddb(drive):
   137 def readzippeddb(drive):
   138   env = dict()
   138   return dbrutils.getzippedDB(drive)
   139   #Note that this is really crude. I'm seeing if it'll work before cleaning things up...
       
   140   #see if we have a build_md5.zip file
       
   141   md5zip = os.path.join(drive,'build_md5.zip')
       
   142   temp_dir = tempfile.mkdtemp()
       
   143   print temp_dir 
       
   144   if(os.path.exists(md5zip)):
       
   145     files = set();
       
   146     files.add('*')
       
   147     dbrutils.extractfromzip(files,md5zip,temp_dir)
       
   148     globsearch = os.path.join(temp_dir, os.path.join(dbrutils.patch_path_internal(),'*.md5'))
       
   149     print globsearch 
       
   150     hashes = glob.glob(globsearch)
       
   151     for file in hashes:
       
   152         print 'Reading: %s\n' % file
       
   153         dbrutils.gethashes(env, file, True)
       
   154   shutil.rmtree(temp_dir)
       
   155   return env
       
   156 
   139