3 commits - ChangeLog dumpMetadata.py modifyrepo.py readMetadata.py

[email protected] (Luke Macken)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 ChangeLog       |    6 ++++++
 dumpMetadata.py |    1 -
 modifyrepo.py   |    4 ++--
 readMetadata.py |    1 -
 4 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit b6d217e0c6b7845f0b0128847443f9d0a58bcd47
Author: Luke Macken <[email protected]>
Date:   Thu Dec 6 22:45:54 2007 -0500

    Update ChangeLog

diff --git a/ChangeLog b/ChangeLog
index d0394a0..e325a6b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
+2007-12-06 10:44  lmacken
+
+	* modifyrepo.py: Better unicode handling
+	* readMetadata.py, dumpMetadata.py: Remove unnecessary imports
+
 2007-12-03 04:33  lmacken
+
 	* docs/modifyrepo.8, createrepo.spec, docs/Makefile:
 	Add a man page for modifyrepo
 
commit b0f2ef0d62e652c9fce6d21611ed7a46aa56aafe
Author: Luke Macken <[email protected]>
Date:   Thu Dec 6 22:44:41 2007 -0500

    Remove some unnecessary imports

diff --git a/dumpMetadata.py b/dumpMetadata.py
index 396435a..a78e81c 100644
--- a/dumpMetadata.py
+++ b/dumpMetadata.py
@@ -32,7 +32,6 @@ import sqlitecachec
 
 # done to fix gzip randomly changing the checksum
 import gzip
-from zlib import error as zlibError
 from gzip import write32u, FNAME
 
 __all__ = ["GzipFile","open"]
diff --git a/readMetadata.py b/readMetadata.py
index 60e6129..0d9dacf 100644
--- a/readMetadata.py
+++ b/readMetadata.py
@@ -18,7 +18,6 @@
 import os
 import sys
 import libxml2
-import pprint
 import stat
 
 def errorprint(stuff):
commit 75b611a4d27fe2df94e0c5dd38df42bf01f2bf07
Author: Luke Macken <[email protected]>
Date:   Thu Dec 6 22:44:24 2007 -0500

    Better unicode handling in modifyrepo

diff --git a/modifyrepo.py b/modifyrepo.py
index 29a7a63..bf1987f 100755
--- a/modifyrepo.py
+++ b/modifyrepo.py
@@ -74,7 +74,7 @@ class RepoMetadata:
         mdtype = mdname.split('.')[0]
         destmd = os.path.join(self.repodir, mdname)
         newmd = gzip.GzipFile(destmd, 'wb')
-        newmd.write(md)
+        newmd.write(md.encode('utf-8'))
         newmd.close()
         print "Wrote:", destmd
 
@@ -104,7 +104,7 @@ class RepoMetadata:
         print "       location =", 'repodata/' + mdname
         print "       checksum =", sha.new(newmd).hexdigest()
         print "      timestamp =", str(os.stat(destmd).st_mtime)
-        print "  open-checksum =", sha.new(md).hexdigest()
+        print "  open-checksum =", sha.new(md.encode('utf-8')).hexdigest()
 
         ## Write the updated repomd.xml
         outmd = file(self.repomdxml, 'w')
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.