avahi/0001-Python3-support.patch
2015-06-21 18:46:39 +02:00

52 lines
1.3 KiB
Diff

From 2ab8bc4d4d393d74dacd23b525715fca7356f996 Mon Sep 17 00:00:00 2001
From: Bastien Nocera <hadess@hadess.net>
Date: Tue, 16 Jun 2015 20:39:36 +0200
Subject: [PATCH] Python3 support
---
avahi-python/avahi/ServiceTypeDatabase.py.in | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/avahi-python/avahi/ServiceTypeDatabase.py.in b/avahi-python/avahi/ServiceTypeDatabase.py.in
index b2035fd..4ddd654 100644
--- a/avahi-python/avahi/ServiceTypeDatabase.py.in
+++ b/avahi-python/avahi/ServiceTypeDatabase.py.in
@@ -138,24 +138,24 @@ class ServiceTypeDatabase:
if __name__ == "__main__":
b = ServiceTypeDatabase()
- print b.items()
+ print (b.items())
- print b["_http._tcp"]
- print b["_ftp._tcp"]
- print b["_webdav._tcp"]
- print b["_webdavs._tcp"]
+ print (b["_http._tcp"])
+ print (b["_ftp._tcp"])
+ print (b["_webdav._tcp"])
+ print (b["_webdavs._tcp"])
- print b.get("gurki._tcp")
- print len(b)
+ print (b.get("gurki._tcp"))
+ print (len(b))
for key, _ in zip(b, xrange(3)):
- print key
+ print (key)
for key, _ in zip(b.iteritems(), xrange(3)):
- print key
+ print (key)
for key, _ in zip(b.itervalues(), xrange(3)):
- print key
+ print (key)
--
2.4.3