Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix "Prefer format() over string interpolation operator" issue #275

Merged
merged 1 commit into from
Jan 3, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,13 @@ def get_iterated_icons(icons):
def get_list_of_themes():
"""Return a list of installed icon themes."""
paths = ["/usr/share/icons/",
"%s/.local/share/icons/" % USERHOME]
"{0!s}/.local/share/icons/".format(USERHOME)]
themes = []
for icon_path in paths:
sub_dirs = listdir(icon_path)
for theme in sub_dirs:
theme_path = path.join(icon_path, theme) + "/"
theme_index = "%sindex.theme" % theme_path
theme_index = "{0!s}index.theme".format(theme_path)
if (path.exists(theme_path) and path.exists(theme_index)
and theme not in themes):
themes.append(theme)
Expand All @@ -191,7 +191,7 @@ def create_icon_theme(theme_name, themes_list):
theme = Gtk.IconTheme()
theme.set_custom_theme(theme_name)
else:
exit("The theme %s is not installed on your system." % theme_name)
exit("The theme {0!s} is not installed on your system.".format(theme_name))
return theme


Expand Down