Kaydet (Commit) 75f9f8f9 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Bug finded in tests. Fixed string literals and format function based problems

üst d302958b
...@@ -190,7 +190,7 @@ def rename(sourceFile, destinationFile): ...@@ -190,7 +190,7 @@ def rename(sourceFile, destinationFile):
try: try:
os.rename(join_path(get.installDIR(), sourceFile), join_path(get.installDIR(), baseDir, destinationFile)) os.rename(join_path(get.installDIR(), sourceFile), join_path(get.installDIR(), baseDir, destinationFile))
except OSError as e: except OSError as e:
error(_('ActionsAPI [rename]: {}: {}').format(e, sourceFile)) error(_('ActionsAPI [rename]: {0}: {1}').format(e, sourceFile))
def dosed(sources, findPattern, replacePattern = '', filePattern = '', deleteLine = False, level = -1): def dosed(sources, findPattern, replacePattern = '', filePattern = '', deleteLine = False, level = -1):
'''replaces patterns in sources''' '''replaces patterns in sources'''
......
...@@ -189,7 +189,7 @@ class Install(AtomicOperation): ...@@ -189,7 +189,7 @@ class Install(AtomicOperation):
int(release) int(release)
inary.version.make_version(version) inary.version.make_version(version)
except (ValueError, inary.version.InvalidVersionError): except (ValueError, inary.version.InvalidVersionError):
raise Error(_("{}-{} is not a valid INARY version format").format(version, release)) raise Error(_("{0}-{1} is not a valid INARY version format").format(version, release))
def check_relations(self): def check_relations(self):
# check dependencies # check dependencies
......
...@@ -450,7 +450,7 @@ class SpecFile(xmlfile.XmlFile, metaclass=autoxml.autoxml): ...@@ -450,7 +450,7 @@ class SpecFile(xmlfile.XmlFile, metaclass=autoxml.autoxml):
break break
def __str__(self): def __str__(self):
s = _('Name: {}, version: {}, release: {}\n').format( s = _('Name: {0}, version: {1}, release: {2}\n').format(
self.source.name, self.history[0].version, self.history[0].release) self.source.name, self.history[0].version, self.history[0].release)
s += _('Summary: {}\n').format(str(self.source.summary)) s += _('Summary: {}\n').format(str(self.source.summary))
s += _('Description: {}\n').format(str(self.source.description)) s += _('Description: {}\n').format(str(self.source.description))
......
...@@ -578,7 +578,7 @@ def do_patch(sourceDir, patchFile, level=0, name=None, reverse=False): ...@@ -578,7 +578,7 @@ def do_patch(sourceDir, patchFile, level=0, name=None, reverse=False):
# Which means stderr and stdout directed so they are None # Which means stderr and stdout directed so they are None
raise Error(_("ERROR: patch ({}) failed").format((patchFile))) raise Error(_("ERROR: patch ({}) failed").format((patchFile)))
else: else:
raise Error(_("ERROR: patch ({}) failed: {}").format(patchFile, out)) raise Error(_("ERROR: patch ({0}) failed: {1}").format(patchFile, out))
os.chdir(cwd) os.chdir(cwd)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment