File tree 2 files changed +1
-25
lines changed
2 files changed +1
-25
lines changed Original file line number Diff line number Diff line change 6
6
import time
7
7
from shutil import copyfile , copytree , rmtree
8
8
9
- try :
10
- input = raw_input
11
- except NameError :
12
- pass
13
-
14
9
NO_PROMPT = False
15
10
16
11
def prompt_key (prompt ):
Original file line number Diff line number Diff line change 26
26
import shutil
27
27
import sys
28
28
import tempfile
29
- import six
30
29
import difflib
31
-
32
- if six .PY2 :
33
- import subprocess32 as subprocess
34
- else :
35
- import subprocess
30
+ import subprocess
36
31
37
32
# The file pointed to by `INSTRUCTIONS_FN` contains `shell` code snippets that
38
33
# may be extracted using the regex defined in `SNIPPET_PATTERN`, and executed
80
75
1
81
76
"""
82
77
83
- # NOTE: Very ugly hack to make this work on Python 2
84
- if six .PY2 :
85
- EXPECTED_STDOUT = EXPECTED_STDOUT .replace ("['" , "[u'" )
86
-
87
-
88
78
# Setup a test directory with all necessary demo files and change into it. This
89
79
# lets us easily clean up all the files created during the demo eventually.
90
80
demo_dir = os .path .dirname (os .path .realpath (__file__ ))
113
103
universal_newlines = True )
114
104
stdout , _ = proc .communicate ()
115
105
116
- # NOTE: Ugly hack to filter deprecation warnings from output on EOLed versions
117
- if sys .version_info < (3 , 6 ):
118
- stdout_filtered_list = []
119
- for line in stdout .split ("\n " ):
120
- if ("import cryptography.exceptions" not in line and
121
- "CryptographyDeprecationWarning" not in line ):
122
- stdout_filtered_list .append (line )
123
- stdout = "\n " .join (stdout_filtered_list )
124
-
125
106
# Fail if the output is not what we expected
126
107
if stdout != EXPECTED_STDOUT :
127
108
difflist = list (difflib .Differ ().compare (
You can’t perform that action at this time.
0 commit comments