Catch IOError: commit code, not wrong example/pgloader.conf

This commit is contained in:
dim 2007-11-28 21:06:14 +00:00
parent d99fc7ba4c
commit 88db262b89
3 changed files with 5 additions and 2 deletions

2
debian/changelog vendored
View File

@ -1,4 +1,4 @@
pgloader (2.2.5~dev) unstable; urgency=low pgloader (2.2.5~dev-1) unstable; urgency=low
* Configuration now supports templates * Configuration now supports templates
* Command line option for setting --reformat_path, -R * Command line option for setting --reformat_path, -R

View File

@ -26,7 +26,7 @@ trailing_sep = True
[simple] [simple]
use_template = simple_tmpl use_template = simple_tmpl
table = simple table = simple
filename = simple/simple..data filename = simple/simple.data
columns = a:1, b:3, c:2 columns = a:1, b:3, c:2
# those reject settings are defaults one # those reject settings are defaults one

View File

@ -89,6 +89,9 @@ class TextReader(DataReader):
except LookupError, e: except LookupError, e:
# codec not found # codec not found
raise PGLoader_Error, "Input codec: %s" % e raise PGLoader_Error, "Input codec: %s" % e
except IOError, e:
# file not found, for example
raise PGLoader_Error, "IOError: %s" % e
else: else:
try: try:
fd = open(self.filename) fd = open(self.filename)