From f4fd8130cafbf260c70ea57916713527a6516757 Mon Sep 17 00:00:00 2001 From: Albert Dengg Date: Fri, 26 Mar 2010 14:04:13 +0100 Subject: [PATCH] work for python 2.5 * import "with" statement from __future__ to be able to use it in 2.5 --- python/cumulus/store/sftp.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/cumulus/store/sftp.py b/python/cumulus/store/sftp.py index de77b64..7ea8815 100644 --- a/python/cumulus/store/sftp.py +++ b/python/cumulus/store/sftp.py @@ -7,6 +7,12 @@ import os, os.path import getpass import re import sys +#needed for python 2.5 +try: + from __future__ import with_statement +except ImportError, e: + raise ImportError('We need the "with" statement, avalible with python >=2.5') + class SSHHostConfig(dict): def __init__(self, hostname, user = None, filename = None): -- 2.20.1