diff options
author | delirious-lettuce <delirious.lettuce@gmail.com> | 2018-02-24 15:44:23 -0700 |
---|---|---|
committer | delirious-lettuce <delirious.lettuce@gmail.com> | 2018-02-24 15:44:23 -0700 |
commit | 641fec7c050ff1f9f5d53aa017c2aa8555bb223b (patch) | |
tree | 0682d6724ad8ad1ffcfa83695852be3c88a74af3 | |
parent | aafebff0c356c923700528d7f318b80fbb1cbee1 (diff) | |
download | onionshare-641fec7c050ff1f9f5d53aa017c2aa8555bb223b.tar.gz onionshare-641fec7c050ff1f9f5d53aa017c2aa8555bb223b.zip |
Remove use of `re` module by using `str.endswith`
-rw-r--r-- | onionshare/common.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/onionshare/common.py b/onionshare/common.py index 79d62ca9..d90f3b78 100644 --- a/onionshare/common.py +++ b/onionshare/common.py @@ -23,7 +23,6 @@ import inspect import os import platform import random -import re import socket import sys import tempfile @@ -58,10 +57,11 @@ def get_platform(): Returns the platform OnionShare is running on. """ plat = platform.system() - if re.match('^.*BSD$', plat): + if plat.endswith('BSD'): plat = 'BSD' return plat + def get_resource_path(filename): """ Returns the absolute path of a resource, regardless of whether OnionShare is installed |