[Python-checkins] python/nondist/sandbox/pep262 install_db.py, 1.6, 1.7

akuchling at users.sourceforge.net akuchling at users.sourceforge.net
Sat Mar 20 13:00:12 EST 2004


Update of /cvsroot/python/python/nondist/sandbox/pep262
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27586

Modified Files:
	install_db.py 
Log Message:
Add parameter for skipping SHA hash

Index: install_db.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/pep262/install_db.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** install_db.py	20 Mar 2004 17:09:20 -0000	1.6
--- install_db.py	20 Mar 2004 18:00:09 -0000	1.7
***************
*** 176,180 ****
  
  
!     def add_file (self, path):
          """add_file(path:string):None
          Record the size, ownership, &c., information for an installed file.
--- 176,180 ----
  
  
!     def add_file (self, path, compute_digest=True):
          """add_file(path:string):None
          Record the size, ownership, &c., information for an installed file.
***************
*** 185,191 ****
              return
          # XXX what to do when hashing: binary or text mode?
!         input = open(path, 'rb')
!         digest = _hash_file(input)
!         input.close()
          stats = os.stat(path)
          self.files[path] = (stats.st_size, stats.st_mode,
--- 185,193 ----
              return
          # XXX what to do when hashing: binary or text mode?
!         digest = '-'
!         if compute_digest:
!             input = open(path, 'rb')
!             digest = _hash_file(input)
!             input.close()
          stats = os.stat(path)
          self.files[path] = (stats.st_size, stats.st_mode,




More information about the Python-checkins mailing list