[arch-dev-public] [PATCH 3/7] Move extracted variable to the correct scope

Dan McGee dan at archlinux.org
Mon Sep 28 00:16:22 EDT 2009


Signed-off-by: Dan McGee <dan at archlinux.org>
---
 namcap.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/namcap.py b/namcap.py
index 509ca3f..55c5240 100755
--- a/namcap.py
+++ b/namcap.py
@@ -152,12 +152,12 @@ packages = args
 
 # Go through each package, get the info, and apply the rules
 for package in packages:
-	extracted = 0
 	if not os.access(package, os.R_OK):
 		print "Error: Problem reading " + package
 		usage()
 
 	if package[-7:] == '.tar.gz':
+		extracted = 0
 		pkgtar = verify_package(package)
 
 		if not pkgtar:			
@@ -166,7 +166,6 @@ for package in packages:
 				continue
 			else:
 				sys.exit(2)
-			
 		
 		pkginfo = pacman.load(package)
 
@@ -206,7 +205,6 @@ for package in packages:
 					for j in ret[2]:
 						print string.ljust(pkginfo.name, 10) + " I: " +  m(j[0]) % j[1]
 
-
 		# Clean up if we extracted anything
 		if extracted:
 			shutil.rmtree(sandbox_directory)
-- 
1.6.4.4



More information about the arch-dev-public mailing list