-
Notifications
You must be signed in to change notification settings - Fork 2
Fix issue 83, jsonp configuration file path computation. #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
HolQue
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Son,
relative paths work now!!
But please replace:
jFile=jFile.strip()
if not re.match("^[a-zA-Z]:",jFile) and not re.match("^[\\/]",jFile):
jFile = CString.NormalizePath(jFile)
if not(os.path.isfile(jFile)):
raise Exception(f"File '{jFile}' is not existing!")
self.lImportedFiles.append(jFile)
self.jsonPath = os.path.dirname(jFile)
try:
sJsonData= self.__load_and_removeComments(os.path.abspath(jFile))
with something like:
# at first normalize:
jFile = CString.NormalizePath(jFile) # (NormalizePath does also the jFile.strip() for you ;-)
# at second check existence
if not(os.path.isfile(jFile)):
raise Exception(f"File '{jFile}' is not existing!")
# only if file exist, further checks makes sense:
if not re.match("^[a-zA-Z]:",jFile) and not re.match("^[\\/]",jFile):
# further consequences if required
self.lImportedFiles.append(jFile)
self.jsonPath = os.path.dirname(jFile)
try:
sJsonData= self.__load_and_removeComments(jFile) # jFile is already normalized, therefore os.path.abspath is not necessary
test-fullautomation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Son,
very good.
Please consider Holgers finding and provide as soon as possible a new pull-request.,
Thank you,
Thomas
|
Hello Holger, Thank you for your comments! Hello Thomas, I have just updated the pull-request. Thank you, |
|
Hi Son, what is this:
? I already mentioned several times now: NormalizePath does a strip() also. Therefore no need to do this when calling NormalizePath(). Please consider my previous comment: |
|
Hello Holger, Sorry for the mistake! I've done it as a habit. Thank you, |
|
Hi @namsonx , |
test-fullautomation
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Son,
merged after discussion with Holger,
Thank you,
Thomas
No description provided.