gobject.py: Simplify or_join_array

This commit is contained in:
Jasper St. Pierre 2013-09-19 15:41:09 -04:00
parent bfbe7127d5
commit 243bec9d0d

View File

@ -160,16 +160,8 @@ class SignalFrame:
def or_join_array (self, array):
if len(array) == 0:
return "???"
v = {}
for i in range(len(array)):
v[str(array[i])] = 1
array = v.keys()
s = array[0]
for i in range(1, len(array)):
s = s + " or %s"%array[i]
return s
else:
return ' or '.join(set(array))
def get_detailed_signal_from_frame(self, frame, signal):
detail = self.read_var (frame, "detail")