mirror of
https://github.com/beetbox/beets.git
synced 2026-02-26 17:21:24 +01:00
chg: dev: add main module.
This commit is contained in:
parent
77a6b0edf8
commit
b1ee9716bf
2 changed files with 16 additions and 0 deletions
6
beets/__main__.py
Normal file
6
beets/__main__.py
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
"""main module."""
|
||||
import sys
|
||||
from .ui import main
|
||||
|
||||
if __name__ == "__main__":
|
||||
main(sys.argv[1:])
|
||||
|
|
@ -946,6 +946,16 @@ class SubcommandsOptionParser(CommonOptionsParser):
|
|||
|
||||
self.subcommands = []
|
||||
|
||||
def get_prog_name(self):
|
||||
"""Get program name.
|
||||
|
||||
Returns:
|
||||
Program name.
|
||||
"""
|
||||
prog_name = super(SubcommandsOptionParser, self).get_prog_name()
|
||||
prog_name = 'beets' if prog_name == '__main__.py' else prog_name
|
||||
return prog_name
|
||||
|
||||
def add_subcommand(self, *cmds):
|
||||
"""Adds a Subcommand object to the parser's list of commands.
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue