Skip to content

Commit 6f87676

Browse files
author
andrewtliew
committed
- Tidied XFunc fix a bit.
1 parent e7720e9 commit 6f87676

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/compas/utilities/xfunc.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@
3030
3131
import json
3232
try:
33-
import cStringIO
33+
from cStringIO import StringIO
3434
except:
35-
import io
35+
from io import StringIO
3636
import cProfile
3737
import pstats
3838
import traceback
@@ -72,10 +72,7 @@
7272
7373
profile.disable()
7474
75-
try:
76-
stream = cStringIO.StringIO()
77-
except:
78-
stream = io.StringIO()
75+
stream = StringIO()
7976
stats = pstats.Stats(profile, stream=stream)
8077
stats.strip_dirs()
8178
stats.sort_stats(1)

0 commit comments

Comments
 (0)