summaryrefslogtreecommitdiff
path: root/x11/py-Xlib/patches/patch-Xlib_rdb.py
blob: e89894697608a2cb1a306cbda2de2c5506a0b2ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$NetBSD: patch-Xlib_rdb.py,v 1.1 2011/08/22 12:18:19 wiz Exp $

Python-3.1 compatibility.

--- Xlib/rdb.py.orig	2007-06-10 14:11:58.000000000 +0000
+++ Xlib/rdb.py
@@ -191,12 +191,13 @@ class ResourceDB:
 
         self.lock.release()
 
-    def __getitem__(self, (name, cls)):
+    def __getitem__(self, nc):
         """db[name, class]
 
         Return the value matching the resource identified by NAME and
         CLASS.  If no match is found, KeyError is raised.
         """
+        name, cls = nc
 
         # Split name and class into their parts