Skip to content

Commit 2ba67d3

Browse files
author
BoboTiG
committed
Fix MSS library loading
1 parent 1395c26 commit 2ba67d3

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

mss.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ class ScreenshotError(Exception):
4444
from LaunchServices import kUTTypePNG
4545
elif system() == 'Linux':
4646
from os import environ
47-
from os.path import dirname
4847
from ctypes.util import find_library
4948
from ctypes import byref, cast, cdll, POINTER, Structure, c_char_p,\
5049
c_int, c_int32, c_long, c_uint, c_uint32, c_ulong, c_ushort, c_void_p, \
@@ -344,7 +343,7 @@ def __init__(self):
344343
self.mss = cdll.LoadLibrary(libmss)
345344
except OSError:
346345
try:
347-
libmss = '{0}/libmss.so'.format(dirname(__file__))
346+
libmss = find_library('mss')
348347
self.mss = cdll.LoadLibrary(libmss)
349348
except OSError:
350349
msg = 'MSS: no MSS library found. ' + \

0 commit comments

Comments
 (0)