Skip to content

Commit

Permalink
Porting changes from FoldingAtHome#56
Browse files Browse the repository at this point in the history
  • Loading branch information
guystreeter authored and ffissore committed Apr 30, 2020
1 parent 85d1bdb commit 6a84dad
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fah/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def process_error(self, app, data):
self.name, self.address, self.port, data)

# Only popup dialog once for each error
if not msg in self.error_messages:
if msg not in self.error_messages:
self.error_messages.add(msg)
app.error(msg)

Expand Down
2 changes: 1 addition & 1 deletion fah/ClientConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -649,7 +649,7 @@ def check_option(model, path, iter, data):

# Removed options
for name in self.options:
if not name in used:
if name not in used:
options[name + '!'] = None

return options
Expand Down
2 changes: 1 addition & 1 deletion fah/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def open(self):
ready = select.select([self.socket], [self.socket], [], 10)
if ready[0]:
err = self.socket.connect_ex((self.address, self.port))
if err != 0 and err != 115 and not err in [
if err != 0 and err != 115 and err not in [
errno.EINPROGRESS, errno.EWOULDBLOCK, WSAEWOULDBLOCK]:
self.fail_reason = 'connect'
raise Exception('Connection failed: ' + errno.errorcode[err])
Expand Down
2 changes: 1 addition & 1 deletion fah/FAHControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1455,7 +1455,7 @@ def on_client_add_button_clicked(self, widget, data=None):
# Make client name
for i in range(sys.maxsize):
name = 'client%d' % i
if not name in self.clients:
if name not in self.clients:
break

self.client_entries['name'].set_text(name)
Expand Down
2 changes: 1 addition & 1 deletion fah/SlotConfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,5 +117,5 @@ def load_dialog(self, app):
# Options
app.slot_option_list.clear()
for name, value in self.options.items():
if not name in used:
if name not in used:
app.slot_option_list.append((name, str(value)))
2 changes: 1 addition & 1 deletion fah/db/Table.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def insert(self, db, **kwargs):
# Error checking
if len(cols) != len(kwargs):
col_names = set(map(Column.get_name, cols))
missing = [kw for kw in list(kwargs.keys()) if not kw in col_names]
missing = [kw for kw in list(kwargs.keys()) if kw not in col_names]
raise Exception('Table %s does not have column(s) %s'
% (self.name, ', '.join(missing)))

Expand Down

0 comments on commit 6a84dad

Please sign in to comment.