Skip to content

Commit e2b7db0

Browse files
committed
Remove utils.autoattr
1 parent ea7d7a7 commit e2b7db0

2 files changed

Lines changed: 7 additions & 171 deletions

File tree

IPython/utils/_process_posix.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
from IPython.external import pexpect
2323

2424
# Our own
25-
from .autoattr import auto_attr
2625
from ._process_common import getoutput, arg_split
2726
from IPython.utils import py3compat
2827
from IPython.utils.encoding import DEFAULT_ENCODING
@@ -55,14 +54,15 @@ class ProcessHandler(object):
5554
logfile = None
5655

5756
# Shell to call for subprocesses to execute
58-
sh = None
57+
_sh = None
5958

60-
@auto_attr
6159
def sh(self):
62-
sh = pexpect.which('sh')
63-
if sh is None:
64-
raise OSError('"sh" shell not found')
65-
return sh
60+
if self._sh is None:
61+
self._sh = pexpect.which('sh')
62+
if self._sh is None:
63+
raise OSError('"sh" shell not found')
64+
65+
return self._sh
6666

6767
def __init__(self, logfile=None, read_timeout=None, terminate_timeout=None):
6868
"""Arguments are used for pexpect calls."""

IPython/utils/autoattr.py

Lines changed: 0 additions & 164 deletions
This file was deleted.

0 commit comments

Comments
 (0)