make default mood "happy", change other mood names
This commit is contained in:
parent
cc369d6b1e
commit
2e393c145e
|
@ -168,13 +168,13 @@ def close_on_error(f): # method decorator
|
||||||
self.close(u"lonely")
|
self.close(u"lonely")
|
||||||
raise
|
raise
|
||||||
except WrongPasswordError:
|
except WrongPasswordError:
|
||||||
self.close(u"scared")
|
self.close(u"scary")
|
||||||
raise
|
raise
|
||||||
except (TypeError, UsageError):
|
except (TypeError, UsageError):
|
||||||
# preconditions don't warrant _close_with_error()
|
# preconditions don't warrant _close_with_error()
|
||||||
raise
|
raise
|
||||||
except:
|
except:
|
||||||
self.close(u"other-error")
|
self.close(u"errory")
|
||||||
raise
|
raise
|
||||||
return _f
|
return _f
|
||||||
|
|
||||||
|
@ -341,7 +341,7 @@ class Wormhole:
|
||||||
except CryptoError:
|
except CryptoError:
|
||||||
raise WrongPasswordError
|
raise WrongPasswordError
|
||||||
|
|
||||||
def close(self, mood=None):
|
def close(self, mood=u"happy"):
|
||||||
if not isinstance(mood, (type(None), type(u""))):
|
if not isinstance(mood, (type(None), type(u""))):
|
||||||
raise TypeError(type(mood))
|
raise TypeError(type(mood))
|
||||||
self._closed = True
|
self._closed = True
|
||||||
|
|
Loading…
Reference in New Issue
Block a user