[pyoai][Job van Achterberg] Changes taken from github/ccare: htt...
[email protected] Wed, 28 Aug 2013 13:13:14 +0200
| Newsgroups | gmane.comp.web.zope.silva.cvs |
|---|---|
| Message-ID | <[email protected]> |
author: Job van Achterberg
date: Wed Aug 28 13:13:04 2013 +0200
revision: 161:2056f88f5365 in pyoai
branch:
details: https://hg.infrae.com/pyoai?cmd=changeset;node=2056f88f5365
modified: src/oaipmh/common.py
added:
removed:
log: Changes taken from github/ccare: https://github.com/ccare/pyoai/comm
it/1bed8ed2ec801c9599cd8229ac2eb3ad82cd81d6
diffstat:
src/oaipmh/common.py | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (15 lines):
diff -r 1bb6c429df07 -r 2056f88f5365 src/oaipmh/common.py
--- a/src/oaipmh/common.py Fri Dec 07 16:06:32 2012 +0100
+++ b/src/oaipmh/common.py Wed Aug 28 13:13:04 2013 +0200
@@ -6,7 +6,10 @@
def __init__(self, identifier, datestamp, setspec, deleted):
# force identifier to be a string, it might be
# an lxml.etree._ElementStringResult...
- self._identifier = str(identifier)
+ try:
+ self._identifier = str(identifier)
+ except UnicodeEncodeError:
+ self._identifier = unicode(identifier)
self._datestamp = datestamp
self._setspec = setspec
self._deleted = deleted