CVS: src/si/extras entitycheck.py,1.29,1.30

Mats Wichmann <[email protected]>
Newsgroups gmane.linux.lsb.implementation
Message-ID <[email protected]>
Update of /cvsroot/lsb/src/si/extras
In directory sc8-pr-cvs1:/tmp/cvs-serv23331/si/extras

Modified Files:
	entitycheck.py 
Log Message:
Add a directory-writability check for "file retrieve" mode


Index: entitycheck.py
===================================================================
RCS file: /cvsroot/lsb/src/si/extras/entitycheck.py,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** entitycheck.py	20 Feb 2003 15:59:49 -0000	1.29
--- entitycheck.py	20 Mar 2003 19:44:25 -0000	1.30
***************
*** 342,356 ****
      fails, missing = [], []
      global initial_text
!     print "Retrieving..."
!     for pkg in missing_packages:
!         if pkg.fetch(locations, fallback_url, package_path):
!             retrieved = retrieved + 1
!         else:
!             if pkg.message == 'retrieval failed':
!                 fails.append(pkg)
!             if pkg.message == 'not found':
!                 # should not happen, but we track 'em so we can catch where
!                 # an entity is defined but not listed in package_locations
!                 missing.append(pkg)
      return (retrieved, fails, missing)
  
--- 342,359 ----
      fails, missing = [], []
      global initial_text
!     if os.access(package_path, os.W_OK):
! 	print "Retrieving..."
! 	for pkg in missing_packages:
! 	    if pkg.fetch(locations, fallback_url, package_path):
! 		retrieved = retrieved + 1
! 	    else:
! 		if pkg.message == 'retrieval failed':
! 		    fails.append(pkg)
! 		if pkg.message == 'not found':
! 		    # should not happen, but we track 'em so we can catch where
! 		    # an entity is defined but not listed in package_locations
! 		    missing.append(pkg)
!     else:
! 	print 'Error: cannot write to package directory "%s"' % package_path
      return (retrieved, fails, missing)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.