Skip to content

None prompt exits cmdloop #692

@deargle

Description

@deargle

This is a silly edge-case, but if the prompt is None, the cmdloop silently exits. A prompt of '' does not exit.

I don't want to have a None prompt, but I accidentally had one while debugging something else and was scratching my head.

from cmd2 import Cmd
class MyApp(Cmd, object):

    def __init__(self):
        self.prompt = None
        Cmd.__init__(self)

app = MyApp()
app.cmdloop()

Python 2.7, cmd2 v0.8.9

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions