Set client password from FAHControl, Fix for Linux dependencies

This commit is contained in:
Joseph Coffland 2020-08-14 16:39:13 -07:00
parent 91e9fe629b
commit 3189958e4e
6 changed files with 21 additions and 3 deletions

View File

@ -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.

View File

@ -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

View File

@ -40,6 +40,8 @@ debug = False
class Client:
def __init__(self, app, name, address, port, password):
if debug: print('Client.__init__()')
self.name = name
self.address = address
self.port = port
@ -109,7 +111,10 @@ class Client:
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
@ -391,6 +396,8 @@ class Client:
def close(self):
if debug: print('Client closing')
# Avoid broken pipe on OSX
if sys.platform == 'darwin':
try:

View File

@ -99,6 +99,8 @@ class Connection:
def open(self):
if debug: print('Connection.open()')
self.reset()
self.last_connect = time.time()
@ -116,6 +118,8 @@ class Connection:
def close(self):
if debug: print('Connection.close()')
if self.socket is not None:
try:
self.socket.shutdown(socket.SHUT_RDWR)

View File

@ -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>

View File

@ -1108,7 +1108,7 @@ class FAHControl(SingleAppServer):
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)