OSDN Git Service

autopep8
[ti2/ti2.git] / linkpair / collect / agent / commandrunner.py
index 069eade..69a5d21 100755 (executable)
@@ -40,7 +40,7 @@ class CommandRunner(object):
 
     def exec_cmd(self, cmdline, enable_cache=True):
         if enable_cache:
-            if self._command_result_cache.has_key(cmdline):
+            if cmdline in self._command_result_cache:
                 return self._command_result_cache[cmdline]
 
         args = shlex.split(cmdline)
@@ -50,7 +50,7 @@ class CommandRunner(object):
             result = Popen(args, stdout=PIPE, stderr=PIPE).stdout.readlines()
         self._command_result_cache[cmdline] = result
         return result
-        
+
     def _exec_cmd_on_ssh(self, cmdline):
         sshc = ssh.SSHClient()
         sshc.load_system_host_keys()