diff --git a/src/calibre/debug.py b/src/calibre/debug.py
index 39c323825f..93237475b2 100644
--- a/src/calibre/debug.py
+++ b/src/calibre/debug.py
@@ -174,13 +174,6 @@ def main(args=sys.argv):
elif opts.command:
sys.argv = args[:1]
exec opts.command
- elif opts.exec_file:
- sys.argv = args
- base = os.path.dirname(os.path.abspath(opts.exec_file))
- sys.path.insert(0, base)
- g = globals()
- g['__name__'] = '__main__'
- execfile(opts.exec_file, g)
elif opts.debug_device_driver:
debug_device_driver()
elif opts.migrate:
diff --git a/src/calibre/ebooks/oeb/reader.py b/src/calibre/ebooks/oeb/reader.py
index 339df7be60..818a423547 100644
--- a/src/calibre/ebooks/oeb/reader.py
+++ b/src/calibre/ebooks/oeb/reader.py
@@ -114,6 +114,8 @@ class OEBReader(object):
except etree.XMLSyntaxError:
data = re.sub(r'(?is).+', '', data)
self.logger.warn('OPF contains invalid tours section')
+ data = data.replace('',
+ '')
opf = etree.fromstring(data)
ns = namespace(opf.tag)