Description: Change string exceptions not supported by Python 2.6
Origin: other, http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=573417
Author: Morten Brekkevold <morten.brekkevold@uninett.no>
Bug-Debian: http://bugs.debian.org/573417
--- forgetsql-0.5.1.orig/lib/forgetSQL.py
+++ forgetsql-0.5.1/lib/forgetSQL.py
@@ -1,5 +1,5 @@
#!/usr/bin/env python
-
+#-*- coding: iso-8859-1 -*-
__version__ = "0.5.1"
## Distributed under LGPL
@@ -210,18 +210,18 @@
try: # to implement 'goto' in Python.. UGH
if not cls._cache.has_key(args):
# unknown
- raise "NotFound"
+ raise NotFound
(ref, updated) = cls._cache[args]
realObject = ref()
if realObject is None:
# No more real references to it, dead object
- raise "NotFound"
+ raise NotFound
age = time.time() - updated
if age > cls._timeout:
# Too old!
- raise "NotFound"
+ raise NotFound
updated = time.time()
- except "NotFound":
+ except NotFound:
# We'll need to create it
realObject = object.__new__(cls, *args)
ref = weakref.ref(realObject)