mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
0920b2cccb
commit
82f03db380
@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en'
|
|||||||
Perform various initialization tasks.
|
Perform various initialization tasks.
|
||||||
'''
|
'''
|
||||||
|
|
||||||
import locale, sys, os
|
import locale, sys, os, re
|
||||||
|
|
||||||
# Default translation is NOOP
|
# Default translation is NOOP
|
||||||
import __builtin__
|
import __builtin__
|
||||||
@ -132,7 +132,8 @@ if not _run_once:
|
|||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
fobject = object.__getattribute__(self, 'fobject')
|
fobject = object.__getattribute__(self, 'fobject')
|
||||||
name = object.__getattribute__(self, 'name')
|
name = object.__getattribute__(self, 'name')
|
||||||
return repr(fobject).replace('>', ' name='+repr(name)+'>')
|
return re.sub(r'''['"]<fdopen>['"]''', repr(name),
|
||||||
|
repr(fobject))
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self)
|
return repr(self)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user