File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -128,19 +128,20 @@ def __init__(self):
128128 self .label = T (32410 , 'Platform Version' )
129129
130130 def valueLabel (self ):
131+ plat = None
131132 try :
132133 import platform
133- dist = platform . dist ()
134- if dist and len ( dist ) > 1 :
135- plat = u'{0} {1}' . format ( dist [ 0 ], dist [ 1 ])
134+ release = platform .freedesktop_os_release ()
135+ if release and release . get ( "PRETTY_NAME" ) :
136+ plat = release [ "PRETTY_NAME" ]
136137 else :
137138 plat = platform .platform ()
138139 plat = u'{0} {1}' .format (plat [0 ], '.' .join (plat [1 ].split ('.' , 2 )[:2 ]))
140+
141+ plat = plat .strip ()
139142 except :
140143 util .ERROR ()
141144
142- plat = plat .strip ()
143-
144145 if not plat :
145146 if xbmc .getCondVisibility ('System.Platform.Android' ):
146147 plat = 'Android'
You can’t perform that action at this time.
0 commit comments