summaryrefslogtreecommitdiff
path: root/cmd2/history.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-05-25 17:49:20 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2019-05-25 17:49:20 -0400
commit1fe024f33574af02c93d4df0eb0ddb88e690305a (patch)
treef7a86354c3f94ea1c3549974c48b7e0ab9d01aa9 /cmd2/history.py
parent2c96da06b2009760bebc20bec1980bf34df93d86 (diff)
downloadcmd2-git-1fe024f33574af02c93d4df0eb0ddb88e690305a.tar.gz
Refactored implementation of HistoryItem.__str__ and added an explicit HistoryItem unit test
Diffstat (limited to 'cmd2/history.py')
-rw-r--r--cmd2/history.py5
1 files changed, 1 insertions, 4 deletions
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: