Mercurial > wikked
changeset 323:8ea76932ea3a
More proper shutdown, and more proper use of the parameter context.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 11 Oct 2014 22:06:41 -0700 |
parents | 566d229d1b30 |
children | 5f809e691124 |
files | wikked/wiki.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/wikked/wiki.py Sat Oct 11 22:05:48 2014 -0700 +++ b/wikked/wiki.py Sat Oct 11 22:06:41 2014 -0700 @@ -143,7 +143,7 @@ # Default to Mercurial. Yes. I just decided that myself. scm_type = 'hg' - if self.context != NORMAL_CONTEXT and scm_type == 'hg': + if self.context == INIT_CONTEXT and scm_type == 'hg': # Quick workaround for when we're creating a new repo, # or running background tasks. # We'll be using the `hg` process instead of the command @@ -237,10 +237,10 @@ for o in order: o.postInit() - def stop(self): + def stop(self, exception=None): """ De-initializes the wiki and its sub-systems. """ - self.db.close() + self.db.close(exception) def reset(self): """ Clears all the cached data and rebuilds it from scratch.