Kaydet (Commit) 10558bc0 authored tarafından Suleyman Poyraz's avatar Suleyman Poyraz

Ufak Fixasyonlar ve hata var şu an minidomdan ötürü. Görmek istersen rdb yap --debug ile görülüyor.

üst ce745f70
......@@ -714,6 +714,7 @@ def locked(func):
raise inary.errors.PrivilegeError(_("You have to be root for this operation."))
import fcntl
fcntl.flock(lock, fcntl.LOCK_EX | fcntl.LOCK_NB)
ctx.locked = True
except IOError:
......@@ -152,7 +152,7 @@ class InstallDB(lazydb.LazyDB):
return version, release, None
def __get_distro_release(self, meta_doc):
distro = meta_doc.getElementsBy TagName("Package")[0].getElementsByTagName("Distribution")[0].firstChild.data
distro = meta_doc.getElementsByTagName("Package")[0].getElementsByTagName("Distribution")[0].firstChild.data
release = meta_doc.getElementsByTagName("Package")[0].getElementsByTagName("DistributionRelease")[0].firstChild.data
return distro, release
......@@ -92,9 +92,9 @@ class RepoOrder:
repo_doc = self._get_doc()
for r in repo_doc.getElementsByTagName("Repo"):
if r.getElementsByTagName("Name")[0].firstChild.data == repo_name:
status_node = r.getElementsByTagName("Status").firstChild.data
status_node = r.getElementsByTagName("Status")
if status_node:
status = status_node.childNodes[0].data
status = status_node[0].childNodes[0].data
if status in ["active", "inactive"]:
return status
return "inactive"
......@@ -41,7 +41,7 @@ def parse(fileName):
dom = minidom.parse(fileName)
return dom.documentElement
except ExpatError, inst:
except ExpatError as inst:
raise Error(_("File '{}' has invalid XML: {}\n").format(fileName,
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