Use os.pardir
This commit is contained in:
parent
59413810bf
commit
f14b37a3c4
@ -172,7 +172,7 @@ def testdata_scheme(qapp):
|
|||||||
@qutescheme.add_handler('testdata')
|
@qutescheme.add_handler('testdata')
|
||||||
def handler(url): # pylint: disable=unused-variable
|
def handler(url): # pylint: disable=unused-variable
|
||||||
file_abs = os.path.abspath(os.path.dirname(__file__))
|
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('/'))
|
url.path().lstrip('/'))
|
||||||
with open(filename, 'rb') as f:
|
with open(filename, 'rb') as f:
|
||||||
data = f.read()
|
data = f.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user