Skip to content

Commit 1d2997e

Browse files
committed
remove comment for old --log-level argument. Use isinstance of string_types for checking choices in prompt_choices.
1 parent 07b2a84 commit 1d2997e

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

tmuxp/cli.py

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import kaptan
2121

2222
from . import log, util, exc, WorkspaceBuilder, Server, config
23-
from ._compat import ascii_lowercase, input
23+
from ._compat import ascii_lowercase, input, string_types
2424
from .workspacebuilder import freeze
2525

2626

@@ -122,10 +122,10 @@ def prompt_choices(name, choices, default=None, no_choice=('none',)):
122122
options = []
123123

124124
for choice in choices:
125-
if type(choice) is str:
125+
if isinstance(choice, string_types):
126126
options.append(choice)
127127
else:
128-
options.append("%s [%s]" % (choice[1], choice[0]))
128+
options.append("%s [%s]" % (choice, choice[0]))
129129
choice = choice[0]
130130
_choices.append(choice)
131131

@@ -722,14 +722,6 @@ def get_parser():
722722

723723
server_parser = argparse.ArgumentParser(add_help=False)
724724

725-
# server_parser.add_argument(
726-
# '--log-level',
727-
# dest='log_level',
728-
# default='INFO',
729-
# metavar='log-level',
730-
# help='Log level e.g. INFO, DEBUG, ERROR'
731-
# )
732-
733725
server_parser.add_argument(
734726
'-L', dest='socket_name',
735727
default=None,

0 commit comments

Comments
 (0)