Commit 9c1f9c39 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Yusei Tahara

follow API changes of psutil-3.0.0.

parent 1da80792
...@@ -87,7 +87,7 @@ class Application(object): ...@@ -87,7 +87,7 @@ class Application(object):
try: try:
for connection in process.connections(): for connection in process.connections():
if connection.status == 'LISTEN' and \ if connection.status == 'LISTEN' and \
connection.local_address[1] == self.port: connection.laddr[1] == self.port:
return True return True
except AccessDenied: except AccessDenied:
return False return False
......
...@@ -120,7 +120,7 @@ class OpenOffice(Application): ...@@ -120,7 +120,7 @@ class OpenOffice(Application):
if process.exe() == join(self.office_binary_path, self._bin_soffice): if process.exe() == join(self.office_binary_path, self._bin_soffice):
for connection in process.connections(): for connection in process.connections():
if connection.status == "LISTEN" and \ if connection.status == "LISTEN" and \
connection.local_address[1] == self.port: connection.laddr[1] == self.port:
process.terminate() process.terminate()
except AccessDenied, e: except AccessDenied, e:
pass pass
......
...@@ -14,7 +14,7 @@ install_requires = [ ...@@ -14,7 +14,7 @@ install_requires = [
'PasteDeploy', 'PasteDeploy',
'PasteScript', 'PasteScript',
'WSGIUtils', 'WSGIUtils',
'psutil>=2.0.0', 'psutil>=3.0.0',
'lxml', 'lxml',
'python-magic', 'python-magic',
'argparse', 'argparse',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment