diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-06-30 17:22:18 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-06-30 17:22:18 -0400 |
commit | 613a1b7d9868c658b8269dcc0db66f43c05311be (patch) | |
tree | 8155522800d1cbd320325abcbafb4cd9a02eec3b /cmd2.py | |
parent | 959aeed2438f00720845383daba2a1f30097a8dc (diff) | |
download | cmd2-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-x | cmd2.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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: |