Skip to content

Commit

Permalink
Merge pull request #148 from jaraco/patch-1
Browse files Browse the repository at this point in the history
Avoid attempting to read from non-existent file. Fixes #147.
  • Loading branch information
asweigart authored Oct 4, 2020
2 parents 9c9bbb7 + 3ff0e0b commit 5def664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyperclip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,7 @@ def determine_clipboard():
elif os.name == 'nt' or platform.system() == 'Windows':
return init_windows_clipboard()

if platform.system() == 'Linux':
if platform.system() == 'Linux' and os.path.isfile('/proc/version'):
with open('/proc/version', 'r') as f:
if "microsoft" in f.read().lower():
return init_wsl_clipboard()
Expand Down

0 comments on commit 5def664

Please sign in to comment.