summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-30 17:22:18 -0400
committerTodd Leonhardt <todd.leonhardt@gmail.com>2017-06-30 17:22:18 -0400
commit613a1b7d9868c658b8269dcc0db66f43c05311be (patch)
tree8155522800d1cbd320325abcbafb4cd9a02eec3b /cmd2.py
parent959aeed2438f00720845383daba2a1f30097a8dc (diff)
downloadcmd2-git-613a1b7d9868c658b8269dcc0db66f43c05311be.tar.gz
Fixed a sys.platform check
So it turns out that on Linux, it sys.platform is "linux2" in Python 2 and "linux" in Python 3, so if doing a comparsion, need to do a .startswith() instead of a ==
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index 97160515..43fdee54 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -305,7 +305,7 @@ def options(option_list, arg_desc="arg"):
# Can we access the clipboard, always true on Windows and Mac, but only sometimes on Linux
can_clip = True
-if sys.platform == 'linux':
+if sys.platform.startswith('linux'):
try:
pyperclip.paste()
except pyperclip.exceptions.PyperclipException: