acoustid / mbdata

MusicBrainz SQLAlchemy Models
MIT License
97 stars 23 forks source link

mbslave without arguments just fails #36

Closed CoolCold closed 1 year ago

CoolCold commented 2 years ago
root@mbdata:~/tmp/mbdata# ./mbslave.py
Traceback (most recent call last):
  File "./mbslave.py", line 6, in <module>
    main()
  File "/root/tmp/mbdata/mbdata/replication.py", line 607, in main
    args.func(config, args)
AttributeError: 'Namespace' object has no attribute 'func'

while

root@mbdata:~/tmp/mbdata# ./mbslave.py -h
usage: mbslave.py [-h] [-c, --config PATH] {import,sync,remap-schema,print-sql,psql} ...

positional arguments:
  {import,sync,remap-schema,print-sql,psql}

optional arguments:
  -h, --help            show this help message and exit
  -c, --config PATH     path to the config file (default: mbslave.conf:/etc/mbslave.conf)

works.

This at least is discouraging, printing help message is expected

root@mbdata:~/tmp/mbdata# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.3 LTS
Release:        20.04
Codename:       focal
root@mbdata:~/tmp/mbdata# python --version
Python 3.8.10