Mercurial > p > roundup > code
diff roundup/instance.py @ 4506:51aa98cda2cf
Do not depend on a CPython implementation detail anymore...
...to make Roundup more compatible with other Python implementation
like PyPy.
Closes issue2550707. Thanks to Christof Meerwald.
| author | Bernhard Reiter <Bernhard.Reiter@intevation.de> |
|---|---|
| date | Wed, 22 Jun 2011 12:34:31 +0000 |
| parents | 80a9295a60fd |
| children | 996cc758f704 |
line wrap: on
line diff
--- a/roundup/instance.py Mon Jun 06 20:00:17 2011 +0000 +++ b/roundup/instance.py Wed Jun 22 12:34:31 2011 +0000 @@ -30,6 +30,7 @@ import os import sys +import __builtin__ from roundup import configuration, mailgw from roundup import hyperdb, backends, actions from roundup.cgi import client, templating @@ -86,7 +87,7 @@ sys.path.remove(libdir) def get_backend_name(self): - o = __builtins__['open'] + o = __builtin__.open f = o(os.path.join(self.config.DATABASE, 'backend_name')) name = f.readline().strip() f.close()
