Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
Set client password from FAHControl, Fix for Linux dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoffland committed Aug 14, 2020
1 parent 91e9fe6 commit 3189958
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 3 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Folding@home Advanced Control Changelog
=======================================

## v7.6.13
- Set client password from FAHControl.

## v7.6.3
- Fix for Linux dependencies.

## v7.5.2
- Removed verbosity option.
- Fixed link to project page.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ See: https://foldingathome.org/

## Debian / Ubuntu

sudo apt-get install -y python-stdeb python-gtk2 python-all debhelper
sudo apt-get install -y python-stdeb python-gtk2 python-all debhelper \
dh-python

## RedHat / CentOS

Expand Down
7 changes: 7 additions & 0 deletions fah/Client.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@

class Client:
def __init__(self, app, name, address, port, password):
if debug: print('Client.__init__()')

self.name = name
self.address = address
self.port = port
Expand Down Expand Up @@ -109,7 +111,10 @@ def set_address(self, address, port):
self.conn.address = self.address = address
self.conn.port = self.port = port


def set_password(self, password):
if self.conn.is_connected():
self.conn.queue_command('option password "%s"' % password)
self.conn.password = self.password = password


Expand Down Expand Up @@ -391,6 +396,8 @@ def reconnect(self):


def close(self):
if debug: print('Client closing')

# Avoid broken pipe on OSX
if sys.platform == 'darwin':
try:
Expand Down
4 changes: 4 additions & 0 deletions fah/Connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ def reset(self):


def open(self):
if debug: print('Connection.open()')

self.reset()
self.last_connect = time.time()

Expand All @@ -116,6 +118,8 @@ def open(self):


def close(self):
if debug: print('Connection.close()')

if self.socket is not None:
try:
self.socket.shutdown(socket.SHUT_RDWR)
Expand Down
2 changes: 1 addition & 1 deletion fah/FAHControl.glade
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes">&lt;b&gt;Project Leader&lt;/b&gt;
Dr. Gregory Bowman
Washington State University in Saint Louis</property>
Washington University in Saint Louis</property>
<property name="use_markup">True</property>
<property name="justify">center</property>
</object>
Expand Down
2 changes: 1 addition & 1 deletion fah/FAHControl.py
Original file line number Diff line number Diff line change
Expand Up @@ -1108,7 +1108,7 @@ def update_client(self, client, name, address, port, password):

if client.get_password() != password:
client.set_password(password)
reload = True
reload = not client.conn.is_connected()

# Update client row
row = client.get_row(self)
Expand Down

0 comments on commit 3189958

Please sign in to comment.