diff --git a/src/calibre/ebooks/lrf/objects.py b/src/calibre/ebooks/lrf/objects.py index caf226f5d3..b8b276d3a4 100644 --- a/src/calibre/ebooks/lrf/objects.py +++ b/src/calibre/ebooks/lrf/objects.py @@ -97,8 +97,8 @@ class LRFContentObject(LRFObject): tag_map = {} - def __init__(self, bytes, objects): - self.stream = bytes if hasattr(bytes, 'read') else io.BytesIO(bytes) + def __init__(self, byts, objects): + self.stream = byts if hasattr(byts, 'read') else io.BytesIO(byts) length = self.stream_size() self.objects = objects self._contents = [] diff --git a/src/calibre/ebooks/metadata/odt.py b/src/calibre/ebooks/metadata/odt.py index bdad22aebf..5583d25bae 100644 --- a/src/calibre/ebooks/metadata/odt.py +++ b/src/calibre/ebooks/metadata/odt.py @@ -56,13 +56,13 @@ fields = { } -def normalize(str): +def normalize(s): """ The normalize-space function returns the argument string with whitespace normalized by stripping leading and trailing whitespace and replacing sequences of whitespace characters by a single space. """ - return whitespace.sub(' ', str).strip() + return whitespace.sub(' ', s).strip() class MetaCollector: @@ -75,9 +75,9 @@ class MetaCollector: self._content = [] self.dowrite = True - def write(self, str): + def write(self, s): if self.dowrite: - self._content.append(str) + self._content.append(s) def content(self): return ''.join(self._content)