From 14ed95ebfe05da00865881d49828562648381f62 Mon Sep 17 00:00:00 2001 From: Griatch Date: Fri, 4 May 2012 09:20:30 +0000 Subject: [PATCH] Removed with statement, it's not well supported (without future import) in python 2.5. --- src/utils/utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/utils.py b/src/utils/utils.py index d92ccafb2..538e85d01 100644 --- a/src/utils/utils.py +++ b/src/utils/utils.py @@ -243,9 +243,8 @@ def get_evennia_version(): Check for the evennia version info. """ try: - with open(settings.BASE_PATH + os.sep + "VERSION") as f: - return "%s-r%s" % (f.read().strip(), os.popen("hg id -i").read().strip()) - return + f = open(settings.BASE_PATH + os.sep + "VERSION", 'r') + return "%s-r%s" % (f.read().strip(), os.popen("hg id -i").read().strip()) except IOError: return "Unknown version"