otherwise we could have
```
Traceback (most recent call last):
File "<string>", line 1, in <module>
NameError: name 'file' is not defined
```
Fixes: https://tracker.ceph.com/issues/45512
Signed-off-by: Kefu Chai <kchai@redhat.com>
"""
pexpect_templ = \
"import pexpect; " \
- "pexpect.run('{cmd}', logfile=file('{log}', 'w'), timeout=None)"
+ "pexpect.run('{cmd}', logfile=open('{log}', 'wb'), timeout=None)"
def start():
console_cmd = self._console_command()