Skip to content

Commit

Permalink
wip: fix path handling
Browse files Browse the repository at this point in the history
  • Loading branch information
StoneyJackson committed Apr 22, 2024
1 parent f43c4e7 commit d9149a5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions plcc/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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')
Expand Down Expand Up @@ -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')
Expand Down

0 comments on commit d9149a5

Please sign in to comment.