[Python-modules-commits] [python-zeroconf] 01/17: Fix DNSText repr Python 3 issue
Ruben Undheim
rubund-guest at moszumanska.debian.org
Mon Oct 5 07:56:09 UTC 2015
This is an automated email from the git hooks/post-receive script.
rubund-guest pushed a commit to branch master
in repository python-zeroconf.
commit e8299c0527c965f83c1326b18e484652a9eb829c
Author: Paulus Schoutsen <paulus at paulusschoutsen.nl>
Date: Mon Aug 17 22:23:46 2015 -0700
Fix DNSText repr Python 3 issue
Prevents following exception:
```
File "/Users/paulus/dev/python/netdisco/lib/python3.4/site-packages/zeroconf.py", line 412, in __repr__
return self.to_string(self.text[:7] + "...")
TypeError: can't concat bytes to str
```
---
zeroconf.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/zeroconf.py b/zeroconf.py
index de427ea..d73c41e 100644
--- a/zeroconf.py
+++ b/zeroconf.py
@@ -409,7 +409,7 @@ class DNSText(DNSRecord):
def __repr__(self):
"""String representation"""
if len(self.text) > 10:
- return self.to_string(self.text[:7] + "...")
+ return self.to_string(self.text[:7]) + "..."
else:
return self.to_string(self.text)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-zeroconf.git
More information about the Python-modules-commits
mailing list