mirror of
https://github.com/onionshare/onionshare.git
synced 2024-12-28 08:49:30 -05:00
Remove use of re
module by using str.endswith
This commit is contained in:
parent
aafebff0c3
commit
641fec7c05
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user