apply patch by Toshio Kuratomi to fix some unit tests with Python 2.6
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import traceback
|
import traceback
|
||||||
from StringIO import StringIO
|
from StringIO import StringIO
|
||||||
|
from types import FileType
|
||||||
import os,shutil
|
import os,shutil
|
||||||
from test import fixture
|
from test import fixture
|
||||||
from migrate.versioning.repository import Repository
|
from migrate.versioning.repository import Repository
|
||||||
@@ -19,7 +20,7 @@ class Shell(fixture.Shell):
|
|||||||
def execute(self,shell_cmd,runshell=None):
|
def execute(self,shell_cmd,runshell=None):
|
||||||
"""A crude simulation of a shell command, to speed things up"""
|
"""A crude simulation of a shell command, to speed things up"""
|
||||||
# If we get an fd, the command is already done
|
# If we get an fd, the command is already done
|
||||||
if isinstance(shell_cmd,file) or isinstance(shell_cmd,StringIO):
|
if isinstance(shell_cmd, FileType) or isinstance(shell_cmd, StringIO):
|
||||||
return shell_cmd
|
return shell_cmd
|
||||||
# Analyze the command; see if we can 'fake' the shell
|
# Analyze the command; see if we can 'fake' the shell
|
||||||
try:
|
try:
|
||||||
|
|||||||
Reference in New Issue
Block a user