pep8'd sugar3.bundle

This commit is contained in:
William Orr 2013-05-17 01:21:30 -04:00 committed by Daniel Narvaez
parent 8a6c935dd0
commit 9e4454a2ed
3 changed files with 20 additions and 15 deletions

View File

@ -72,9 +72,12 @@ def _expand_lang(locale):
for i in range(mask + 1):
if not (i & ~mask): # if all components for this combo exist ...
val = language
if i & COMPONENT_TERRITORY: val += territory
if i & COMPONENT_CODESET: val += codeset
if i & COMPONENT_MODIFIER: val += modifier
if i & COMPONENT_TERRITORY:
val += territory
if i & COMPONENT_CODESET:
val += codeset
if i & COMPONENT_MODIFIER:
val += modifier
ret.append(val)
ret.reverse()
return ret
@ -315,7 +318,8 @@ class ActivityBundle(Bundle):
mime_types = self.get_mime_types()
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')
if not os.path.isdir(installed_icons_dir):
os.makedirs(installed_icons_dir)
@ -364,7 +368,8 @@ class ActivityBundle(Bundle):
mime_types = self.get_mime_types()
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')
if os.path.isdir(installed_icons_dir):
for f in os.listdir(installed_icons_dir):

View File

@ -123,7 +123,7 @@ class NormalizedVersion(object):
def __str__(self):
version_string = '.'.join(str(v) for v in self.parts)
if self._local != None:
if self._local is not None:
version_string += self._local
return version_string