Thanks, pushed<br><br>Gonzalo<br><br><div class="gmail_quote">On Tue, Nov 22, 2011 at 8:45 AM, Manuel Quiñones <span dir="ltr"><<a href="mailto:manuq@laptop.org">manuq@laptop.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="HOEnZb"><div class="h5">The mfg-data directory is located in another path for some builds, so<br>
the activity has to check in both places for existence. This fixes<br>
Log for olpc #11116.<br>
<br>
Signed-off-by: Manuel Quiñones <<a href="mailto:manuq@laptop.org">manuq@laptop.org</a>><br>
---<br>
logcollect.py | 18 +++++++++++++-----<br>
1 files changed, 13 insertions(+), 5 deletions(-)<br>
<br>
diff --git a/logcollect.py b/logcollect.py<br>
index a1251a4..82c1bba 100644<br>
--- a/logcollect.py<br>
+++ b/logcollect.py<br>
@@ -51,6 +51,9 @@ import httplib<br>
import mimetypes<br>
import urlparse<br>
<br>
+MFG_DATA_PATHS = ['/ofw/mfg-data/', '/proc/device-tree/mfg-data/']<br>
+<br>
+<br>
class MachineProperties:<br>
"""Various machine properties in easy to access chunks.<br>
"""<br>
@@ -111,12 +114,17 @@ class MachineProperties:<br>
return line[8:].strip()<br>
<br>
def _mfg_data(self, item):<br>
- """Return mfg data item from /ofw/mfg-data/"""<br>
-<br>
- if not os.path.exists('/ofw/mfg-data/'+item):<br>
+ """Return mfg data item from mfg-data directory"""<br>
+<br>
+ mfg_path = None<br>
+ for test_path in MFG_DATA_PATHS:<br>
+ if os.path.exists(test_path + item):<br>
+ mfg_path = test_path + item<br>
+ break<br>
+ if mfg_path == None:<br>
return ''<br>
-<br>
- v = self.__read_file('/ofw/mfg-data/'+item)<br>
+<br>
+ v = self.__read_file(mfg_path)<br>
# Remove trailing 0 character, if any:<br>
if v != '' and ord(v[len(v)-1]) == 0:<br>
v = v[:len(v)-1]<br>
--<br>
1.7.7.3<br>
<br>
</div></div></blockquote></div><br>