[meld] Use misc.cmdout() instead of os.popen() for Codeville plugin
- From: Vincent Legoll <vincele src gnome org>
- To: svn-commits-list gnome org
- Subject: [meld] Use misc.cmdout() instead of os.popen() for Codeville plugin
- Date: Wed, 22 Apr 2009 14:49:06 -0400 (EDT)
commit fe2cda0db7f3694bb5914a31a8a9b23028580f04
Author: Vincent Legoll <vincent legoll gmail com>
Date: Tue Apr 21 23:27:56 2009 +0200
Use misc.cmdout() instead of os.popen() for Codeville plugin
---
vc/cdv.py | 13 +++----------
1 files changed, 3 insertions(+), 10 deletions(-)
diff --git a/vc/cdv.py b/vc/cdv.py
index 6ab495b..1c1b956 100644
--- a/vc/cdv.py
+++ b/vc/cdv.py
@@ -22,7 +22,7 @@
### THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
import os
-import errno
+import misc
import _vc
import svn
@@ -39,13 +39,6 @@ class Vc(svn.Vc):
return self.root
def _get_matches(self, directory):
- while True:
- try:
- entries = os.popen('cd "%s" && %s status' % (directory, self.CMD))
- break
- except OSError, e:
- if e.errno != errno.EAGAIN:
- raise
-
- for line in entries.read().split("\n")[1:-1]:
+ entries = misc.cmdout([self.CMD, "status"], cwd=directory)[0]
+ for line in entries.split("\n")[1:-1]:
yield line[3:], line[0], ""
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]