[jbrout: 1/2] Add TODO list for keeping list of bugs

Matej Cepl mcepl at fedoraproject.org
Tue Jul 5 00:41:33 UTC 2011


commit 5445e511c86b7f8c49d9ff30e5be6c4752eb7d5e
Author: Matěj Cepl <mcepl at redhat.com>
Date:   Tue Jul 5 01:49:00 2011 +0200

    Add TODO list for keeping list of bugs

 TODO                            |    1 +
 jbrout-no-double-keywords.patch |   37 +++++++++++++++++++++++++++++++++++++
 2 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..7cbeb74
--- /dev/null
+++ b/TODO
@@ -0,0 +1 @@
+Doesn't remove tags.
diff --git a/jbrout-no-double-keywords.patch b/jbrout-no-double-keywords.patch
index cca858c..96edac0 100644
--- a/jbrout-no-double-keywords.patch
+++ b/jbrout-no-double-keywords.patch
@@ -37,3 +37,40 @@ Index: jbrout/jbrout/jbrout/pyexiv.py
          ll.sort()
          return ll
  
+@@ -128,10 +141,12 @@ class Exiv2Metadata(object):
+ 
+         if l:
+             self._md["Iptc.Application2.Keywords"] = [i.encode("utf_8") for i in l]
+-            self._md["Xmp.dc.subject"]=l
++            self._md["Xmp.dc.subject"] = [",".join(l)]
+         else:
+             del self._md["Iptc.Application2.Keywords"]
+             del self._md["Xmp.dc.subject"]
++        if 'Xmp.iptc.Keywords' in self._md.xmp_keys:
++            del self._md['Xmp.iptc.Keywords']
+ 
+ 
+     def clearTags(self):
+@@ -139,6 +154,8 @@ class Exiv2Metadata(object):
+             del self._md["Iptc.Application2.Keywords"]
+         if "Xmp.dc.subject" in self._md.xmp_keys:
+             del self._md["Xmp.dc.subject"]
++        if 'Xmp.iptc.Keywords' in self._md.xmp_keys:
++            del self._md['Xmp.iptc.Keywords']
+ 
+ 
+     def copyToFile(self, destFilename, exif=True, iptc=True, xmp=True, comment=True):
+Index: jbrout/jbrout/jbrout/tools.py
+===================================================================
+--- jbrout.orig/jbrout/jbrout/tools.py
++++ jbrout/jbrout/jbrout/tools.py
+@@ -496,8 +496,8 @@ isreal : %s""" % (
+     def __maj(self):
+         try:
+             self.__info.writeMetadata()
++        # TODO Why do we catch this exception? Shouldn't it just fail?
+         except IOError:
+-            # XXX not recognized yet by pyexiv2. Another option to save infos ?
+             pass
+         self.__refresh()
+ 


More information about the scm-commits mailing list