Kaydet (Commit) 9395d148 authored tarafından Gürer Özen's avatar Gürer Özen

bu Checks sınıfı kullanılmıyordu.

üst 3a483434
......@@ -540,7 +540,7 @@ def resurrect_package(package_fn, write_files, txn = None):
errs = metadata.errors()
if errs:
util.Checks.print_errors(errs)
util.print_errors(errs)
raise Error, _("MetaData format wrong (%s)") % package_fn
ctx.ui.info(_('* Adding \'%s\' to db... ') % (metadata.package.name), noln=True)
......
......@@ -127,7 +127,7 @@ class Package:
self.metadata.read( join(outdir, ctx.const.metadata_xml) )
errs = self.metadata.errors()
if errs:
util.Checks.print_errors(errs)
util.print_errors(errs)
raise Error, _("MetaData format wrong")
self.files = Files()
......
......@@ -42,27 +42,10 @@ class FileError(Error):
# spec validation utility #
#########################
class Checks:
def __init__(self):
self.list = []
def print_errors(errlist):
for err in errlist:
ctx.ui.error(err)
def add(self, err):
self.list.append(err)
def join(self, list):
self.list.extend(list)
def has_tag(self, var, section, name):
if not var:
self.list.append(_("%s section should have a '%s' tag") % (section, name))
def has_error(self):
return len(self.list)>0
def print_errors(list):
for x in list:
ctx.ui.error(x)
print_errors = staticmethod(print_errors)
#########################
# string/list/functional#
......
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