scripts/supybot: Invoke i18n in the 'try' block to handle the case where the config file does not exist.

This commit is contained in:
Valentin Lorentz 2013-06-01 16:26:16 +02:00
parent 8aba15807d
commit 18c671fc6c
1 changed files with 1 additions and 1 deletions

View File

@ -184,9 +184,9 @@ if __name__ == '__main__':
docs/GETTING_STARTED and follow the instructions."""))
else:
registryFilename = args.pop()
i18n.getLocaleFromRegistryFilename(registryFilename)
try:
# The registry *MUST* be opened before importing log or conf.
i18n.getLocaleFromRegistryFilename(registryFilename)
registry.open_registry(registryFilename)
shutil.copy(registryFilename, registryFilename + '.bak')
except registry.InvalidRegistryFile as e: