From: Michael Tremer Date: Sun, 6 Mar 2011 15:03:13 +0000 (+0100) Subject: Fix namespace collision. X-Git-Tag: 0.9.3~92 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1de83040135c14e763303d7c045b6cc30c2a4a3f;p=pakfire.git Fix namespace collision. --- diff --git a/pakfire/repository/index.py b/pakfire/repository/index.py index 946071fbd..ced0be908 100644 --- a/pakfire/repository/index.py +++ b/pakfire/repository/index.py @@ -181,7 +181,7 @@ class LocalIndex(DatabaseIndexFactory): def open_database(self): self.db = database.RemotePackageDatabase(self.pakfire, ":memory:") - def save(self, path=None, compress="xz"): + def save(self, path=None, algo="xz"): """ This function saves the database and metadata to path so it can be exported to a remote repository. @@ -214,8 +214,8 @@ class LocalIndex(DatabaseIndexFactory): "%s-%s" % (db_hash, os.path.basename(db_path))) # Compress the database. - if compress: - compress.compress(db_path, algo=compress, progress=True) + if algo: + compress.compress(db_path, algo=algo, progress=True) if not os.path.exists(db_path2): shutil.move(db_path, db_path2) @@ -228,7 +228,7 @@ class LocalIndex(DatabaseIndexFactory): # Save name of the hashed database to the metadata. md.database = os.path.basename(db_path2) md.database_hash1 = db_hash - md.database_compression = compress + md.database_compression = algo # Save metdata to repository. md.save(md_path)