156 | | application = workclass() |
157 | | application.deferredInit() |
158 | | retcode = application.main(arguments, options) |
159 | | except KeyboardInterrupt : |
160 | | logerr("\nInterrupted with Ctrl+C !\n") |
161 | | retcode = -3 |
162 | | except PyKotaCommandLineError, msg : |
163 | | logerr("%s : %s\n" % (sys.argv[0], msg)) |
164 | | retcode = -2 |
165 | | except SystemExit : |
166 | | pass |
167 | | except : |
168 | | title = _("%(appname)s failed") % locals() |
170 | | application.crashed(title) |
| 158 | application = workclass() |
| 159 | application.deferredInit() |
| 160 | retcode = application.main(arguments, options) |
| 161 | except KeyboardInterrupt : |
| 162 | logerr("\nInterrupted with Ctrl+C !\n") |
| 163 | retcode = -3 |
| 164 | except PyKotaCommandLineError, msg : |
| 165 | logerr("%s : %s\n" % (sys.argv[0], msg)) |
| 166 | retcode = -2 |
| 167 | except SystemExit : |
| 168 | pass |
| 169 | except : |
| 170 | title = _("%(appname)s failed") % locals() |
| 171 | try : |
| 172 | application.crashed(title) |
| 173 | except : |
| 174 | crashed(title) |
| 175 | retcode = -1 |
| 176 | finally : |
| 177 | try : |
| 178 | application.storage.close() |