Skip to content

Commit

Permalink
Replace f-strings with format() to ensure compatibility with Python 3.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeinazarov committed Jul 19, 2024
1 parent abcd389 commit 1df3574
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions supervisor/options.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,8 @@ def process_config_file(self, do_usage=True):
# if this is called from an RPC method, raise an error
raise ValueError(msg)
if hasattr(self, 'minfds') and hasattr(self, 'minprocs'):
print(f"Debug: minfds = {self.minfds}")
print(f"Debug: minprocs = {self.minprocs}")
print("Debug: minfds = {}".format(self.minfds))
print("Debug: minprocs = {}".format(self.minprocs))
# Previous version
# def process_config_file(self, do_usage):
# # Process config file
Expand Down Expand Up @@ -1930,8 +1930,9 @@ def set_rlimits_or_exit(self):
usage() if any rlimits could not be set."""
limits = []
if hasattr(self, 'minfds') and hasattr(self, 'minprocs'):
print(f"Debug: minfds = {self.minfds}")
print(f"Debug: minprocs = {self.minprocs}")
print("Debug: minfds = {}".format(self.minfds))
print("Debug: minprocs = {}".format(self.minprocs))


if hasattr(resource, "RLIMIT_NOFILE"):
if self.minfds is None:
Expand Down

0 comments on commit 1df3574

Please sign in to comment.