1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- from __future__ import print_function
16-
1715import logging
1816import sys
1917
@@ -51,7 +49,7 @@ def usage(name):
5149 details = _commands [name ]
5250 if details .deprecated :
5351 print ("[WARNING] This command is deprecated and will be removed" )
54- print ("Usage: newrelic-admin %s %s" % ( name , details .options ) )
52+ print (f "Usage: newrelic-admin { name } { details .options } " )
5553
5654
5755@command ("help" , "[command]" , hidden = True )
@@ -74,18 +72,18 @@ def help(args):
7472 name = args [0 ]
7573
7674 if name not in _commands :
77- print ("Unknown command '%s '." % name , end = " " )
75+ print (f "Unknown command '{ name } '." , end = " " )
7876 print ("Type 'newrelic-admin help' for usage." )
7977
8078 else :
8179 details = _commands [name ]
8280
83- print ("Usage: newrelic-admin %s %s" % ( name , details .options ) )
81+ print (f "Usage: newrelic-admin { name } { details .options } " )
8482 if details .description :
8583 print ()
8684 description = details .description
8785 if details .deprecated :
88- description = "[DEPRECATED] " + description
86+ description = f "[DEPRECATED] { description } "
8987 print (description )
9088
9189
@@ -117,7 +115,7 @@ def emit(self, record):
117115
118116def load_internal_plugins ():
119117 for name in _builtin_plugins :
120- module_name = "%s.%s" % ( __name__ , name )
118+ module_name = f" { __name__ } . { name } "
121119 __import__ (module_name )
122120
123121
@@ -151,7 +149,7 @@ def main():
151149 callback = _commands [command ]
152150
153151 except Exception :
154- print ("Unknown command '%s '." % command , end = "" )
152+ print (f "Unknown command '{ command } '." , end = "" )
155153 print ("Type 'newrelic-admin help' for usage." )
156154 sys .exit (1 )
157155
0 commit comments