From 6a93e69feeda4a50eda8f4ff03ecb6558c0e4d1b Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Thu, 28 Apr 2011 09:31:48 +0900 Subject: [PATCH] prevent people from shooting themselves in the foot --- anki/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anki/__init__.py b/anki/__init__.py index 38658e636..8382aa318 100644 --- a/anki/__init__.py +++ b/anki/__init__.py @@ -45,5 +45,9 @@ elif sys.version_info[1] < 5: if sys.getfilesystemencoding().lower() in ("ascii", "ansi_x3.4-1968"): raise Exception("Anki requires a UTF-8 locale.") +import os +if not os.path.exists(os.path.expanduser("~/.no-warranty")): + raise Exception("Don't use this without reading the forum thread") + version = "1.99" from anki.storage import Deck