[hackers] [wmii] [python] Small fixes. || Kris Maglione

From: <hg_AT_suckless.org>
Date: Mon, 19 Jul 2010 16:50:31 +0000 (UTC)

changeset: 2767:5b510b0c693e
user: Kris Maglione <kris_AT_suckless.org>
date: Mon Jul 19 09:30:11 2010 -0400
files: alternative_wmiircs/python/pygmi/fs.py alternative_wmiircs/python/wmiirc.py
description:
[python] Small fixes.

diff -r 3cbb8301e698 -r 5b510b0c693e alternative_wmiircs/python/pygmi/fs.py
--- a/alternative_wmiircs/python/pygmi/fs.py Mon Jul 19 09:29:12 2010 -0400
+++ b/alternative_wmiircs/python/pygmi/fs.py Mon Jul 19 09:30:11 2010 -0400
@@ -585,24 +585,22 @@
         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 @@
     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 -r 3cbb8301e698 -r 5b510b0c693e alternative_wmiircs/python/wmiirc.py
--- a/alternative_wmiircs/python/wmiirc.py Mon Jul 19 09:29:12 2010 -0400
+++ b/alternative_wmiircs/python/wmiirc.py Mon Jul 19 09:30:11 2010 -0400
@@ -74,7 +74,7 @@
 
 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':
Received on Mon Jul 19 2010 - 18:50:31 CEST

This archive was generated by hypermail 2.2.0 : Mon Jul 19 2010 - 19:00:08 CEST