Permalink
Browse files

Fix "unexpected EOF on client connection" errors.

Fixes issue #5.
  • Loading branch information...
1 parent 97b0691 commit ab7cd071d9921e0e3a0beb66178d822d480f3640 @cluther cluther committed May 21, 2012
Showing with 10 additions and 8 deletions.
  1. +4 −4 README.markdown
  2. +2 −0 ZenPacks/zenoss/PostgreSQL/poll_postgres.py
  3. +3 −3 ZenPacks/zenoss/PostgreSQL/util.py
  4. +1 −1 setup.py
View
@@ -15,8 +15,8 @@ Depending on what version of Zenoss you're running you will need a different
package. Download the appropriate package for your Zenoss version from the list
below.
- * Zenoss 4.1 - 4.2: [Packages for Zenoss 4][]
- * Zenoss 3.0 - 4.0: [Packages for Zenoss 3][]
+ * Zenoss 4.1 - 4.2: [Packages for Python 2.7][]
+ * Zenoss 3.0 - 4.0: [Packages for Python 2.6][]
Then copy it to your Zenoss server and run the following commands as the zenoss
user.
@@ -163,6 +163,6 @@ remodeled. This occur once every 12 hours.
[Zenoss]: <http://www.zenoss.com/>
-[Packages for Zenoss 4]: <http://zenpacks.zenoss.com/pypi/github/3.2/ZenPacks.zenoss.PostgreSQL/>
-[Packages for Zenoss 3]: <http://zenpacks.zenoss.com/pypi/github/4.2/ZenPacks.zenoss.PostgreSQL/>
+[Packages for Python 2.7]: <http://zenpacks.zenoss.com/pypi/github/4.2/ZenPacks.zenoss.PostgreSQL/>
+[Packages for Python 2.6]: <http://zenpacks.zenoss.com/pypi/github/3.2/ZenPacks.zenoss.PostgreSQL/>
[git repository]: <https://github.com/zenoss/ZenPacks.zenoss.PostgreSQL>
@@ -176,6 +176,8 @@ def getData(self):
else:
self._data[k] = v
+ pg.close()
+
self._cacheData()
return self._data
@@ -93,10 +93,10 @@ def __init__(self, host, port, username, password, ssl):
self._ssl = ssl
self._connections = {}
- def __del__(self):
- for conn in self._connections.values():
+ def close(self):
+ for value in self._connections.values():
try:
- conn.close()
+ value['connection'].close()
except Exception:
pass
View
@@ -16,7 +16,7 @@
# or saved. Do not modify them directly here.
# NB: PACKAGES is deprecated
NAME = "ZenPacks.zenoss.PostgreSQL"
-VERSION = "1.0.4"
+VERSION = "1.0.5"
AUTHOR = "Zenoss"
LICENSE = "GPLv2"
NAMESPACE_PACKAGES = ['ZenPacks', 'ZenPacks.zenoss']

0 comments on commit ab7cd07

Please sign in to comment.