pep8'd sugar3.bundle
This commit is contained in:
parent
8a6c935dd0
commit
9e4454a2ed
@ -72,9 +72,12 @@ def _expand_lang(locale):
|
|||||||
for i in range(mask + 1):
|
for i in range(mask + 1):
|
||||||
if not (i & ~mask): # if all components for this combo exist ...
|
if not (i & ~mask): # if all components for this combo exist ...
|
||||||
val = language
|
val = language
|
||||||
if i & COMPONENT_TERRITORY: val += territory
|
if i & COMPONENT_TERRITORY:
|
||||||
if i & COMPONENT_CODESET: val += codeset
|
val += territory
|
||||||
if i & COMPONENT_MODIFIER: val += modifier
|
if i & COMPONENT_CODESET:
|
||||||
|
val += codeset
|
||||||
|
if i & COMPONENT_MODIFIER:
|
||||||
|
val += modifier
|
||||||
ret.append(val)
|
ret.append(val)
|
||||||
ret.reverse()
|
ret.reverse()
|
||||||
return ret
|
return ret
|
||||||
@ -315,7 +318,8 @@ class ActivityBundle(Bundle):
|
|||||||
|
|
||||||
mime_types = self.get_mime_types()
|
mime_types = self.get_mime_types()
|
||||||
if mime_types is not None:
|
if mime_types is not None:
|
||||||
installed_icons_dir = os.path.join(xdg_data_home,
|
installed_icons_dir = \
|
||||||
|
os.path.join(xdg_data_home,
|
||||||
'icons/sugar/scalable/mimetypes')
|
'icons/sugar/scalable/mimetypes')
|
||||||
if not os.path.isdir(installed_icons_dir):
|
if not os.path.isdir(installed_icons_dir):
|
||||||
os.makedirs(installed_icons_dir)
|
os.makedirs(installed_icons_dir)
|
||||||
@ -364,7 +368,8 @@ class ActivityBundle(Bundle):
|
|||||||
|
|
||||||
mime_types = self.get_mime_types()
|
mime_types = self.get_mime_types()
|
||||||
if mime_types is not None:
|
if mime_types is not None:
|
||||||
installed_icons_dir = os.path.join(xdg_data_home,
|
installed_icons_dir = \
|
||||||
|
os.path.join(xdg_data_home,
|
||||||
'icons/sugar/scalable/mimetypes')
|
'icons/sugar/scalable/mimetypes')
|
||||||
if os.path.isdir(installed_icons_dir):
|
if os.path.isdir(installed_icons_dir):
|
||||||
for f in os.listdir(installed_icons_dir):
|
for f in os.listdir(installed_icons_dir):
|
||||||
|
@ -123,7 +123,7 @@ class NormalizedVersion(object):
|
|||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
version_string = '.'.join(str(v) for v in self.parts)
|
version_string = '.'.join(str(v) for v in self.parts)
|
||||||
if self._local != None:
|
if self._local is not None:
|
||||||
version_string += self._local
|
version_string += self._local
|
||||||
return version_string
|
return version_string
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user