Skip to content

Commit 844d350

Browse files
committed
Fix off-by-one
Signed-off-by: Sebastian Ramacher <sebastian+dev@ramacher.at>
1 parent a82e648 commit 844d350

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bpython/curtsies.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ def main(args=None, locals_=None, banner=None):
4141
if options.log is None:
4242
options.log = 0
4343
logging_levels = [logging.ERROR, logging.INFO, logging.DEBUG]
44-
level = logging_levels[min(len(logging_levels), options.log)]
44+
level = logging_levels[min(len(logging_levels) - 1, options.log)]
4545
logging.getLogger('curtsies').setLevel(level)
4646
logging.getLogger('bpython').setLevel(level)
4747
if options.log:

0 commit comments

Comments
 (0)