Diff
Not logged in

Differences From Artifact [c15e09c135]:

To Artifact [394f213744]:


63
64
65
66
67
68
69


















70
71
72
73
74
75
76
            url=line[n+9:]
            if url.startswith('*:'):
                url="localhost"+url[1:]
    if url is None:
        return None
    return "spice://"+url.rstrip('\r')      



















#
# command implementation
#

def cmd_spiceuri(options):
    print spiceurl(options)








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
            url=line[n+9:]
            if url.startswith('*:'):
                url="localhost"+url[1:]
    if url is None:
        return None
    return "spice://"+url.rstrip('\r')      



def list_bridges():
    lst=[]
	with os.popen("/sbin/brctl show", "r") as f:
		for line in f:
			n = line.find('\t');
			if n <= 0:
				continue
			name = line[:n]
			if name == "bridge name":
				continue
			lst.append(name)
	return lst


print repr(list_bridges())

#
# command implementation
#

def cmd_spiceuri(options):
    print spiceurl(options)