Codebase list sugar-log-activity / a18f323
Set PEP8 Pro-Panda authored 6 years ago James Cameron committed 4 years ago
2 changed file(s) with 7 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
161161 d = open('/proc/device-tree/openprom/model', 'r').read()
162162 v = self._trim_null(d)
163163 return v
164 except:
164 except BaseException:
165165 pass
166166
167167 try:
168168 d = open('/ofw/openprom/model', 'r').read()
169169 v = self._trim_null(d)
170170 return v
171 except:
171 except BaseException:
172172 pass
173173
174174 try:
175175 d = open('/sys/class/dmi/id/bios_version', 'r').read()
176176 v = self._trim_null(d)
177177 return v
178 except:
178 except BaseException:
179179 pass
180180
181181 return ''
262262 """Collect XO logfiles and machine metadata for reporting to OLPC
263263
264264 """
265
265266 def __init__(self):
266267 self._mp = MachineProperties()
267268
260260 for path in self.paths:
261261 try:
262262 files = os.listdir(path)
263 except:
263 except BaseException:
264264 logging.debug(
265265 _("ERROR: Failed to look for files in '%(path)s'.") %
266266 {'path': path})
433433 f.close()
434434
435435 self._written = (self._pos - init_pos)
436 except:
436 except BaseException:
437437 self.insert(self.get_end_iter(),
438438 _("Error: Can't open file '%s'\n") % self.logfile)
439439 self._written = 0
687687 # FIXME: subprocess or thread
688688 try:
689689 self._collector.write_logs(archive=filepath, logbytes=0)
690 except:
690 except BaseException:
691691 success = False
692692
693693 self.popdown(True)