From 2d43fe0d528c4f7bd60016271d4c7597f397d6c0 Mon Sep 17 00:00:00 2001 From: "Auke Booij (tulcod)" Date: Mon, 2 Aug 2010 16:05:45 +0200 Subject: One more performance update --- g_common/g_common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/g_common/g_common.py b/g_common/g_common.py index 31057e5..648daa4 100644 --- a/g_common/g_common.py +++ b/g_common/g_common.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import getopt, sys, os, string, urllib, re, subprocess +import getopt, sys, os import settings #__doc__="Usage: "+sys.argv[0]+" [...]" @@ -78,6 +78,7 @@ def list_packages(repo_location): #generate a tree of ebuilds... note that we only link ebuild files, instead of generating them #we will, however, generate metadata.xml and Manifest files def generate_tree(repo_location,generate_manifest,generate_metadata): + import hashlib, subprocess repo_conf=read_repo_config(repo_location) driver_conf=read_driver_config(repo_conf['driver']) @@ -85,7 +86,6 @@ def generate_tree(repo_location,generate_manifest,generate_metadata): raise NotImplementedError ebuild_file=settings.COMMON_EBUILD_FILE #get from settings - import hashlib ebuild_digest=hashlib.sha1(open(ebuild_file).read()).hexdigest() Manifest="EBUILD %s "+str(os.path.getsize(ebuild_file))+" SHA1 "+ebuild_digest -- cgit v1.2.3-65-gdbad