Skip to content
This repository was archived by the owner on Dec 21, 2021. It is now read-only.

Commit 548ff00

Browse files
committed
yet some more robustness
1 parent 87533a6 commit 548ff00

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/common/pyradlib/pyrad_proc.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ class ProcMixin():
2222
'''Process and pipeline management for Python Radiance scripts
2323
'''
2424
def raise_on_error(self, actstr, e):
25+
try: self._strtypes
26+
except AttributeError: self.__configure_subprocess()
2527
if hasattr(e, 'strerror'): eb = e.strerror
2628
elif isinstance(e, self._strtypes): eb = e
2729
else: eb = e
@@ -58,8 +60,6 @@ def __configure_subprocess(self):
5860
else: self._pipeargs = {}
5961
# type names vary between Py2.7 and 3.x
6062
self._strtypes = (type(b''), type(u''))
61-
# private attribute to indicate established configuration
62-
self.__proc_mixin_setup = True
6363

6464
def qjoin(self, sl):
6565
'''Join a list with quotes around each element containing whitespace.
@@ -73,7 +73,7 @@ def _q(s):
7373
return ' '.join([_q(s) for s in sl])
7474

7575
def __parse_args(self, _in, out):
76-
try: self.__proc_mixin_setup
76+
try: self._strtypes
7777
except AttributeError: self.__configure_subprocess()
7878
instr = ''
7979
if _in == PIPE:

0 commit comments

Comments
 (0)