Commit 5e3ad9d8 authored by Marek Gumiński's avatar Marek Gumiński

Fixed bug in spec identification. Now board may contain '-' in name

parent 53e5201e
......@@ -100,8 +100,9 @@ class spec:
if bus == -1:
# this file has name in format of <string>-<id>
# so name must by splitted with '-'
# id is element nr 1
bus = string.split(devices[0], '-')[1]
# id is the last element (if string contain '-' there may be more then 2 elements)
# list[-1] is a last element of list in python
bus = string.split(devices[0], '-')[-1]
# id is in string hex format ie 0100
# got to take first two chars and convert to int
return int( bus[0:2], 16)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment