[or-cvs] r24020: {arm} Couple minor fixes for resolving the pwd via pwdx. (in arm/trunk: . src/util)
Damian Johnson
atagar1 at gmail.com
Sun Jan 2 03:51:45 UTC 2011
Author: atagar
Date: 2011-01-02 03:51:45 +0000 (Sun, 02 Jan 2011)
New Revision: 24020
Modified:
arm/trunk/TODO
arm/trunk/src/util/sysTools.py
Log:
Couple minor fixes for resolving the pwd via pwdx.
Modified: arm/trunk/TODO
===================================================================
--- arm/trunk/TODO 2011-01-02 03:38:32 UTC (rev 24019)
+++ arm/trunk/TODO 2011-01-02 03:51:45 UTC (rev 24020)
@@ -89,8 +89,6 @@
* When attaching to a TBB instance arm is degraded in several noticeable
ways:
* unable to query man page results
- * autodetection for relative cookie path is broken
- * path prefix detection (for instance to find the torrc) is broken
* The default resolver isn't configurable.
* The cpu usage spikes for scrollable content when the key's held. Try
coalescing the events.
Modified: arm/trunk/src/util/sysTools.py
===================================================================
--- arm/trunk/src/util/sysTools.py 2011-01-02 03:38:32 UTC (rev 24019)
+++ arm/trunk/src/util/sysTools.py 2011-01-02 03:51:45 UTC (rev 24020)
@@ -163,15 +163,15 @@
# pwdx results are of the form:
# 3799: /home/atagar
# 5839: No such process
- results = sysTools.call("pwdx %s" % pid)
+ results = call("pwdx %s" % pid)
if not results:
raise IOError("pwdx didn't return any results")
elif results[0].endswith("No such process"):
raise IOError("pwdx reported no process for pid " + pid)
- elif len(results) != 1 or results.count(" ") != 1:
+ elif len(results) != 1 or results[0].count(" ") != 1:
raise IOError("we got unexpected output from pwdx")
else:
- pwd = results[0][results[0].find(" ") + 1:]
+ pwd = results[0][results[0].find(" ") + 1:].strip()
PWD_CACHE[pid] = pwd
return pwd
except IOError, exc:
More information about the tor-commits
mailing list