Skip to content

Commit

Permalink
Fix 'duplicate-string-formatting-argument' warning
Browse files Browse the repository at this point in the history
  • Loading branch information
crwood committed Nov 27, 2018
1 parent b16b3e8 commit b7d685b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
8 changes: 4 additions & 4 deletions gridsync/desktop.py
Expand Up @@ -105,12 +105,12 @@ def _autostart_enable_linux(executable):
with open(autostart_file_path, 'w') as f:
f.write('''\
[Desktop Entry]
Name={}
Comment={}
Name={0}
Comment={0}
Type=Application
Exec=env PATH={} {}
Exec=env PATH={1} {2}
Terminal=false
'''.format(APP_NAME, APP_NAME, os.environ['PATH'], executable))
'''.format(APP_NAME, os.environ['PATH'], executable))


def _autostart_enable_mac(executable):
Expand Down
4 changes: 2 additions & 2 deletions gridsync/gui/invite.py
Expand Up @@ -237,10 +237,10 @@ def toggle_tor_status(self, state):
self.lineedit.setStyleSheet(
"border-width: 1px;"
"border-style: solid;"
"border-color: {};"
"border-color: {0};"
"border-radius: 2px;"
"padding: 2px;"
"color: {};".format(TOR_DARK_PURPLE, TOR_DARK_PURPLE))
"color: {0};".format(TOR_DARK_PURPLE))
else:
self.lineedit.status_action.setIcon(self.lineedit.blank_icon)
self.lineedit.status_action.setToolTip("")
Expand Down
8 changes: 4 additions & 4 deletions gridsync/gui/share.py
Expand Up @@ -488,13 +488,13 @@ def on_done(self, _):
if self.joined_folders and len(self.joined_folders) == 1:
target = self.joined_folders[0]
self.message_label.setText(
'Successfully joined folder "{}"!\n"{}" is now available for '
'download'.format(target, target))
'Successfully joined folder "{0}"!\n"{0}" is now available '
'for download'.format(target))
elif self.joined_folders:
target = humanized_list(self.joined_folders, 'folders')
self.message_label.setText(
'Successfully joined {}!\n{} are now available for '
'download'.format(target, target))
'Successfully joined {0}!\n{0} are now available for '
'download'.format(target))

def on_grid_already_joined(self, grid_name):
QMessageBox.information(
Expand Down

0 comments on commit b7d685b

Please sign in to comment.