saadjsct / matrixcli

Command line matrix client
GNU General Public License v3.0
135 stars 14 forks source link

matrixcli requires config file even if all parameters are specified on command line #15

Open marcone opened 3 years ago

marcone commented 3 years ago

It appears that even though all required parameters can be specified on the command line, matrixcli still requires them to be in a config file:

$ ./matrixcli --server someserver --username theuser --password sekrit send -r roomid message
WARNING: config file does not exist
Traceback (most recent call last):
  File "./matrixcli", line 128, in config_vs_options
    server = config.accounts[0]["server"]
AttributeError: module 'config.py' has no attribute 'accounts'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./matrixcli", line 356, in <module>
    server, username, password = config_vs_options()
  File "./matrixcli", line 177, in config_vs_options
    return args_server, args_username, args_password
NameError: name 'args_server' is not defined

If I put all the same information (server, user, password) in a config file, then it works.