Skip to content
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

Update PKI_VERSION in tomcat.conf #4510

Merged
merged 1 commit into from
Jul 21, 2023
Merged

Conversation

edewata
Copy link
Contributor

@edewata edewata commented Jul 21, 2023

The PKI_VERSION in tomcat.conf has been modified to use quotes like other properties in the file so they all can be processed more consistently.

The PropertyFile and PKIUpgradeTracker classes have been modified to support optional quotes.

Copy link
Contributor

@ckelleyRH ckelleyRH left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, one small question.

Comment on lines 589 to 590
length = len(self.quote)
value = value[length:-length]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to accept a case where there is more than one quotation character, e.g. ""[application_version]""?
If not, then this can simplify to value = value[1:-1] - and in the other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python does support triple quotes (''' or """) but I guess we don't really need to support that. I've added a code to check the quote length and changed the quote removal like you described.

The PKI_VERSION in tomcat.conf has been modified to use quotes
like other properties in the file so they all can be processed
more consistently.

The PropertyFile and PKIUpgradeTracker classes have been
modified to support optional quotes.
@sonarcloud
Copy link

sonarcloud bot commented Jul 21, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@edewata
Copy link
Contributor Author

edewata commented Jul 21, 2023

@ckelleyRH Thanks!

@edewata edewata merged commit 3e987bc into dogtagpki:master Jul 21, 2023
138 of 139 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants