From d9149a5808c1aca00606b3bc29ce3cc241da1e1d Mon Sep 17 00:00:00 2001 From: Stoney Jackson Date: Mon, 22 Apr 2024 15:05:38 +0000 Subject: [PATCH] wip: fix path handling --- plcc/__main__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plcc/__main__.py b/plcc/__main__.py index 7b8d0aa0..f3667e0b 100644 --- a/plcc/__main__.py +++ b/plcc/__main__.py @@ -255,7 +255,7 @@ def lexFinishUp(): if not dst: death('illegal destdir flag value') try: - os.mkdir(dst) + os.mkdir(str(dst)) debug('[lexFinishUp] ' + dst + ': destination subdirectory created') except FileExistsError: debug('[lexFinishUp] ' + dst + ': destination subdirectory exists') @@ -267,11 +267,11 @@ def lexFinishUp(): libplcc = getFlag('libplcc') std = pathlib.Path(libplcc) / 'lib' / 'Std' try: - os.mkdir(std) + os.mkdir(str(std)) except FileExistsError: pass except: - death(std + ': cannot access directory') + death(str(std) + ': cannot access directory') fname = '{}/{}'.format(dst, 'Token.java') try: tokenFile = open(fname, 'w') @@ -887,7 +887,7 @@ def semFinishUp(stubs, destFlag='destdir', ext='.java'): if not dst: death('illegal destdir flag value') try: - os.mkdir(dst) + os.mkdir(str(dst)) debug('[semFinishUp] ' + dst + ': destination subdirectory created') except FileExistsError: debug('[semFinishUp] ' + dst + ': destination subdirectory exists')