- if not self._system_info:
- req = {'method': 'SystemInfo.getInfo'}
- try:
- res = self._conn.SyncRequest(req, timeout)
- if 'error' in res:
- return None
- self._system_info = system_info.SystemInfo.FromDict(
- camel_case.ToUnderscore(res['result']))
- finally:
- self._conn.Close()
- return self._system_info
+ req = {'method': 'SystemInfo.getInfo'}
+ try:
+ res = self._conn.SyncRequest(req, timeout)
+ finally:
+ self._conn.Close()
+ if 'error' in res:
+ return None
+ return system_info.SystemInfo.FromDict(
+ camel_case.ToUnderscore(res['result']))