Fixed an uncaught exception in Lookup.configure.

This commit is contained in:
Jeremy Fincher 2003-09-24 07:55:28 +00:00
parent 38aad75a89
commit 6928a3a54f

View File

@ -60,7 +60,11 @@ def configure(onStart, afterConnect, advanced):
print 'The file itself should be composed of lines of the form key:value.'
while yn('Would you like to add a file?') == 'y':
filename = something('What\'s the filename?')
try:
fd = file(os.path.join(conf.dataDir, filename))
except OSError, e:
print 'I couldn\'t open that file: %s' % e
continue
counter = 1
try:
for line in fd: