Use os.pardir

This commit is contained in:
Florian Bruhin 2018-09-15 15:47:44 +02:00
parent 59413810bf
commit f14b37a3c4

View File

@ -172,7 +172,7 @@ def testdata_scheme(qapp):
@qutescheme.add_handler('testdata')
def handler(url): # pylint: disable=unused-variable
file_abs = os.path.abspath(os.path.dirname(__file__))
filename = os.path.join(file_abs, '..', 'end2end',
filename = os.path.join(file_abs, os.pardir, 'end2end',
url.path().lstrip('/'))
with open(filename, 'rb') as f:
data = f.read()