Skip to content

Commit

Permalink
Merge pull request #398 from Silvea12/master
Browse files Browse the repository at this point in the history
Fixed addresses not allowing dynamic alongside other options
  • Loading branch information
kozec authored Sep 30, 2017
2 parents 8864664 + a8a5fc3 commit 8f2c37e
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions syncthing_gtk/deviceeditor.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,15 +116,10 @@ def on_save_reuqested(self):
#@Overrides
def store_value(self, key, w):
if key == "vaddresses":
addresses = w.get_text().strip()
if addresses == "dynamic":
# Special case
self.set_value("addresses", "dynamic")
else:
addresses = [
x.strip() if "://" in x else "tcp://%s" % (x.strip(),)
for x in addresses.split(",") ]
self.set_value("addresses", ",".join(addresses))
addresses = [
x.strip() if "://" in x or x.strip() == "dynamic" else "tcp://%s" % (x.strip(),)
for x in w.get_text().split(",") ]
self.set_value("addresses", ",".join(addresses))
elif key == "vfolders":
# Generate dict of { folder_id : bool } where bool is True if
# folder should be shared with this device
Expand Down

0 comments on commit 8f2c37e

Please sign in to comment.