diff options
author | Treeki <treeki@gmail.com> | 2014-02-15 17:41:19 +0100 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2014-02-15 17:41:19 +0100 |
commit | fce9ae6cb332bd2525d5e9e113f9e779ca214c64 (patch) | |
tree | 275e573eb900a10080626164e2611e9d74b73cbe | |
parent | 5023cda47feb4d88e43dd88600490199c61ab348 (diff) | |
download | bounce4-fce9ae6cb332bd2525d5e9e113f9e779ca214c64.tar.gz bounce4-fce9ae6cb332bd2525d5e9e113f9e779ca214c64.zip |
make python client pull server hostname from sys.argv
-rw-r--r-- | python_client.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/python_client.py b/python_client.py index 9cfcd74..ed4d5b1 100644 --- a/python_client.py +++ b/python_client.py @@ -537,7 +537,7 @@ class MainWindow(QtWidgets.QMainWindow): global sock try: basesock = socket.socket(socket.AF_INET, socket.SOCK_STREAM, 0) - basesock.connect(('localhost', 5454)) + basesock.connect((hostname, 5454)) #sock = ssl.wrap_socket(basesock) sock = basesock thd = threading.Thread(None, reader) @@ -575,8 +575,9 @@ class MainWindow(QtWidgets.QMainWindow): -if len(sys.argv) > 1: - password = sys.argv[1] +hostname = sys.argv[1] +if len(sys.argv) > 2: + password = sys.argv[2] else: print('No password entered on command line!') |