From 1fe024f33574af02c93d4df0eb0ddb88e690305a Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Sat, 25 May 2019 17:49:20 -0400 Subject: Refactored implementation of HistoryItem.__str__ and added an explicit HistoryItem unit test --- cmd2/history.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'cmd2/history.py') diff --git a/cmd2/history.py b/cmd2/history.py index 6bec5316..ae2e85ad 100644 --- a/cmd2/history.py +++ b/cmd2/history.py @@ -24,10 +24,7 @@ class HistoryItem(): def __str__(self): """A convenient human readable representation of the history item""" - if self.statement: - return self.statement.raw - else: - return '' + return self.statement.raw @property def raw(self) -> str: -- cgit v1.2.1