Skip to content

Commit 3cd30a2

Browse files
committed
undoing to start from base
1 parent 880e7e6 commit 3cd30a2

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

heudiconv/utils.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -104,35 +104,8 @@ def dec(obj):
104104

105105
def anonymize_sid(sid, anon_sid_cmd):
106106
from subprocess import check_output
107-
108-
import re, sys
109-
from doctest import OutputChecker, DocTestSuite
110-
111-
class Py23DocChecker(OutputChecker):
112-
def check_output(self, want, got, optionflags):
113-
if sys.version_info[0] < 3:
114-
# if running on py2, attempt to prefix all the strings
115-
# with "u" to signify that they're unicode literals
116-
want = re.sub("'(.*?)'", "u'\\1'", want)
117-
return OutputChecker.check_output(self, want, got, optionflags)
118-
119-
def load_tests(loader, tests, ignore):
120-
tests.addTests(DocTestSuite(mymodule, checker=Py23DocChecker()))
121-
return tests
122-
123-
import os
124-
import os.path
125107
cmd = [anon_sid_cmd, sid]
126-
print("CUSTOMDEBUG2")
127-
print(os.getcwd())
128-
shell_out = check_output(cmd)
129-
print(shell_out)
130-
if isinstance(shell_out, bytes):
131-
anon_sid = shell_out.decode()
132-
elif isinstance(shell_out, str):
133-
anon_sid = shell_out
134-
else:
135-
raise TypeError("subprocess did not return a valid string")
108+
anon_sid = check_output(cmd)
136109
return anon_sid.strip()
137110

138111

0 commit comments

Comments
 (0)