Unify string formatting
Use one way of string formatting: replace old `%` style with new `str.format`. Resolve #855.
This commit is contained in:
parent
f984a918b9
commit
4c2d273f07
17 changed files with 67 additions and 65 deletions
|
|
@ -190,7 +190,7 @@ class Config:
|
|||
fd.write(sys.stdin.read())
|
||||
except (IOError, OSError) as e:
|
||||
raise cdist.Error(("Creating tempfile for stdin data "
|
||||
"failed: %s" % e))
|
||||
"failed: {}").format(e))
|
||||
|
||||
args.manifest = initial_manifest_temp_path
|
||||
atexit.register(lambda: os.remove(initial_manifest_temp_path))
|
||||
|
|
@ -764,7 +764,7 @@ class Config:
|
|||
|
||||
raise cdist.UnresolvableRequirementsError(
|
||||
("The requirements of the following objects could not be "
|
||||
"resolved:\n%s") % ("\n".join(info_string)))
|
||||
"resolved:\n{}").format("\n".join(info_string)))
|
||||
|
||||
def _handle_deprecation(self, cdist_object):
|
||||
cdist_type = cdist_object.cdist_type
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue