projects
/
cumulus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
965a638
)
work for python 2.5
author
Albert Dengg
<albert@fsfe.org>
Fri, 26 Mar 2010 13:04:13 +0000
(14:04 +0100)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Tue, 30 Mar 2010 19:56:20 +0000
(12:56 -0700)
* import "with" statement from __future__ to be able to use it in 2.5
python/cumulus/store/sftp.py
patch
|
blob
|
history
diff --git
a/python/cumulus/store/sftp.py
b/python/cumulus/store/sftp.py
index
de77b64
..
7ea8815
100644
(file)
--- 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):