| To: | pcp developers <pcp@xxxxxxxxxxx> |
|---|---|
| Subject: | [PATCH] Fix Local PMDA mode in Python PMAPI |
| From: | Marko Myllynen <myllynen@xxxxxxxxxx> |
| Date: | Mon, 14 Sep 2015 09:53:37 +0300 |
| Delivered-to: | pcp@xxxxxxxxxxx |
| Organization: | Red Hat |
| Reply-to: | myllynen@xxxxxxxxxx |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
---
src/python/pcp/pmapi.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/python/pcp/pmapi.py b/src/python/pcp/pmapi.py
index 4432a79..dbe4710 100644
--- a/src/python/pcp/pmapi.py
+++ b/src/python/pcp/pmapi.py
@@ -1042,7 +1042,7 @@ class pmContext(object):
self._type = typed # the context type
self._target = target # the context target
self._ctx = c_api.PM_ERR_NOCONTEXT # init'd pre-connect
- if type(target) != type(b''):
+ if target and type(target) != type(b''):
source = target.encode('utf-8')
else:
source = target
Thanks,
--
Marko Myllynen
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] Fix environ(7) reference, Marko Myllynen |
|---|---|
| Next by Date: | [PATCH] Enable -L (Local PMDA mode) in pcp2graphite, Marko Myllynen |
| Previous by Thread: | [PATCH] Fix environ(7) reference, Marko Myllynen |
| Next by Thread: | [PATCH] Enable -L (Local PMDA mode) in pcp2graphite, Marko Myllynen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |