commit 94eeb058d9a313cace8f18a8a071a76d9f6b64f5
parent 7b1ed1981c02f71d553614b4186f2607727a3bbe
Author: Kris Maglione <kris@suckless.org>
Date: Mon, 19 Jul 2010 09:30:11 -0400
[python] Small fixes.
Diffstat:
2 files changed, 8 insertions(+), 10 deletions(-)
diff --git a/alternative_wmiircs/python/pygmi/fs.py b/alternative_wmiircs/python/pygmi/fs.py
@@ -585,24 +585,22 @@ class Button(Ctl):
self.name = name
self.base_path = self.sides[side]
self.ctl_path = '%s/%s' % (self.base_path, self.name)
- self.file = None
+ self.ctl_file = None
if colors or label:
self.create(colors, label)
def create(self, colors=None, label=None):
- def fail(resp, exc, tb):
- self.file = None
- if not self.file:
- self.file = client.create(self.ctl_path, ORDWR)
+ if not self.ctl_file:
+ self.ctl_file = client.create(self.ctl_path, ORDWR)
if colors:
self.colors = colors
if label:
self.label = label
def remove(self):
- if self.file:
- self.file.aremove()
- self.file = None
+ if self.ctl_file:
+ self.ctl_file.aremove()
+ self.ctl_file = None
@property
def exists(self):
@@ -665,7 +663,7 @@ class Rules(collections.MutableMapping, utf8):
def setitems(self, items):
self._items = [(k, v if isinstance(v, Rule) else Rule(self, k, v))
for (k, v) in items]
- self.rewrite();
+ self.rewrite()
def __unicode__(self):
return u''.join(unicode(value) for (key, value) in self.iteritems()) or u'\n'
diff --git a/alternative_wmiircs/python/wmiirc.py b/alternative_wmiircs/python/wmiirc.py
@@ -74,7 +74,7 @@ wmii.rules = (
def unresponsive_client(client):
msg = 'The following client is not responding. What would you like to do?'
- resp = call('wihack', '-transient', client.id,
+ resp = call('wihack', '-transient', str(client.id),
'xmessage', '-nearmouse', '-buttons', 'Kill,Wait', '-print',
'%s\n %s' % (msg, client.label))
if resp == 'Kill':