From 82f03db380fa8779c04f1905144da43eb2bc8d0d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 2 Oct 2010 12:05:34 -0600 Subject: [PATCH] ... --- src/calibre/startup.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/calibre/startup.py b/src/calibre/startup.py index e77967501e..1046cd93b3 100644 --- a/src/calibre/startup.py +++ b/src/calibre/startup.py @@ -6,7 +6,7 @@ __docformat__ = 'restructuredtext en' Perform various initialization tasks. ''' -import locale, sys, os +import locale, sys, os, re # Default translation is NOOP import __builtin__ @@ -132,7 +132,8 @@ if not _run_once: def __repr__(self): fobject = object.__getattribute__(self, 'fobject') name = object.__getattribute__(self, 'name') - return repr(fobject).replace('>', ' name='+repr(name)+'>') + return re.sub(r'''['"]['"]''', repr(name), + repr(fobject)) def __str__(self): return repr(self)