Replace useless version check with import from __future__
This commit is contained in:
parent
0b6aebb8a9
commit
08109136b4
|
@ -23,6 +23,8 @@ a real actual sftp server is contacted, and a new folder is created there to
|
||||||
do test file operations in (so no existing files will be harmed).
|
do test file operations in (so no existing files will be harmed).
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
from __future__ import with_statement
|
||||||
|
|
||||||
from binascii import hexlify
|
from binascii import hexlify
|
||||||
import logging
|
import logging
|
||||||
import os
|
import os
|
||||||
|
@ -192,10 +194,6 @@ class SFTPTest (unittest.TestCase):
|
||||||
"""
|
"""
|
||||||
verify that an opened file can be used as a context manager
|
verify that an opened file can be used as a context manager
|
||||||
"""
|
"""
|
||||||
major, minor, micro, releaselevel, serial = sys.version_info
|
|
||||||
if (major, minor) <= (2, 5):
|
|
||||||
return
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with sftp.open(FOLDER + '/duck.txt', 'w') as f:
|
with sftp.open(FOLDER + '/duck.txt', 'w') as f:
|
||||||
f.write(ARTICLE)
|
f.write(ARTICLE)
|
||||||
|
|
Loading…
Reference in New Issue