Skip to content

Commit df08ce4

Browse files
committed
fix output file path issue
1 parent d54ae45 commit df08ce4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

iotedgehubdev/edgemanager.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,11 @@ def outputModuleCred(self, name, islocal, output_file):
221221
cred = [connstrENV, deviceCAEnv]
222222

223223
if output_file is not None:
224-
dir = os.path.dirname(output_file)
224+
output_path = os.path.abspath(output_file)
225+
dir = os.path.dirname(output_path)
225226
if not os.path.exists(dir):
226227
os.makedirs(dir)
227-
with open(output_file, 'w+') as envFile:
228+
with open(output_path, 'w+') as envFile:
228229
envFile.writelines(['\n', cred[0], '\n', cred[1]])
229230
return cred
230231

0 commit comments

Comments
 (0)