~bladernr/checkbox/1095713-set-pipefail-on-sleep-jobs

« back to all changes in this revision

Viewing changes to hwtest/system.py

  • Committer: Marc Tardif
  • Date: 2007-11-01 17:09:53 UTC
  • mfrom: (44.1.50 bug-152956)
  • Revision ID: marc.tardif@canonical.com-20071101170953-xhwsegkpj90y3f37
Added report dumping and loading functionality to fix bug #152956.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import md5
 
2
 
 
3
from hwtest.device import DeviceManager
 
4
 
 
5
 
 
6
system_id = None
 
7
 
 
8
 
 
9
def get_system_id():
 
10
    global system_id
 
11
    if not system_id:
 
12
        device_manager = DeviceManager()
 
13
        computer = device_manager.get_device_by_udi("/org/freedesktop/Hal/devices/computer")
 
14
 
 
15
        fingerprint = md5.new()
 
16
        fingerprint.update(computer.properties["system.vendor"])
 
17
        fingerprint.update(computer.properties["system.product"])
 
18
        system_id = fingerprint.hexdigest()
 
19
 
 
20
    return system_id