mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Remove unused (and unworking) copy method
This commit is contained in:
parent
65f8767057
commit
6eb7383e82
@ -185,17 +185,6 @@ class Metadata(object):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
# Old Metadata API {{{
|
# Old Metadata API {{{
|
||||||
@staticmethod
|
|
||||||
def copy(mi):
|
|
||||||
ans = Metadata(mi.title, mi.authors)
|
|
||||||
for attr in STANDARD_METADATA_FIELDS:
|
|
||||||
if hasattr(mi, attr):
|
|
||||||
setattr(ans, attr, copy.deepcopy(getattr(mi, attr)))
|
|
||||||
for x in mi.user_metadata_keys:
|
|
||||||
meta = mi.get_user_metadata(x)
|
|
||||||
if meta is not None:
|
|
||||||
ans.set_user_metadata(x, meta) # get... did the deep copy
|
|
||||||
|
|
||||||
def print_all_attributes(self):
|
def print_all_attributes(self):
|
||||||
for x in STANDARD_METADATA_FIELDS:
|
for x in STANDARD_METADATA_FIELDS:
|
||||||
prints('%s:'%x, getattr(self, x, 'None'))
|
prints('%s:'%x, getattr(self, x, 'None'))
|
||||||
@ -347,7 +336,7 @@ class Metadata(object):
|
|||||||
ans += [(_('Rights'), unicode(self.rights))]
|
ans += [(_('Rights'), unicode(self.rights))]
|
||||||
for i, x in enumerate(ans):
|
for i, x in enumerate(ans):
|
||||||
ans[i] = u'<tr><td><b>%s</b></td><td>%s</td></tr>'%x
|
ans[i] = u'<tr><td><b>%s</b></td><td>%s</td></tr>'%x
|
||||||
# CUSTFIELD: What to do about custom fields
|
# TODO: NEWMETA: What to do about custom fields
|
||||||
return u'<table>%s</table>'%u'\n'.join(ans)
|
return u'<table>%s</table>'%u'\n'.join(ans)
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user