bugged stringlengths 4 228k | fixed stringlengths 0 96.3M | __index_level_0__ int64 0 481k |
|---|---|---|
def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if not... | 37,700 |
def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | 37,701 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,702 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,703 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,704 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,705 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,706 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,707 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,708 |
def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) n = l return packages | def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend([x for x in binaries[p]['rdepends'] if x not in packages and x in binaries]) n = l return packages | 37,709 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,710 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,711 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,712 |
def __init__(self): """Class constructor | def __init__(self): """Class constructor | 37,713 |
def __init__(self): """Class constructor method: initialize and populate the data lists""" self.__parse_arguments() apt_pkg.init() self.date_now = int(((time.time() / (60*60)) - 15) / 24) self.sources = {'testing': self.read_sources(self.options.testing), 'unstable': self.read_sources(self.options.unstable), 'tpu': sel... | def __init__(self): """Class constructor method: initialize and populate the data lists""" self.__parse_arguments() apt_pkg.init() self.date_now = int(((time.time() / (60*60)) - 15) / 24) self.sources = {'testing': self.read_sources(self.options.testing), 'unstable': self.read_sources(self.options.unstable), 'tpu': sel... | 37,714 |
def maxver(self, pkg, dist): maxver = None if self.sources[dist].has_key(pkg): maxver = self.sources[dist][pkg]['version'] for arch in self.options.architectures.split(): if not self.binaries[dist][arch][0].has_key(pkg): continue pkgv = self.binaries[dist][arch][0][pkg]['version'] if maxver == None or apt_pkg.VersionCo... | def maxver(self, pkg, dist): maxver = None if self.sources[dist].has_key(pkg): maxver = self.sources[dist][pkg]['version'] for arch in self.options.architectures: if not self.binaries[dist][arch][0].has_key(pkg): continue pkgv = self.binaries[dist][arch][0][pkg]['version'] if maxver == None or apt_pkg.VersionCompare(pk... | 37,715 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,716 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,717 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,718 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,719 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,720 |
def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | def get_dependency_solvers(self, block, arch, distribution): packages = [] missing = [] | 37,721 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,722 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,723 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,724 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,725 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,726 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,727 |
def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | def should_upgrade_srcarch(self, src, arch, suite): # binnmu this arch? source_t = self.sources['testing'][src] source_u = self.sources[suite][src] | 37,728 |
def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 37,729 |
def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 37,730 |
def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | def should_upgrade_src(self, src, suite): source_u = self.sources[suite][src] if src in self.sources['testing']: source_t = self.sources['testing'][src] if apt_pkg.VersionCompare(source_t['version'], source_u['version']) == 0: # Candidate for binnmus only return False else: source_t = None | 37,731 |
def main(self): """Main method, entry point for the analisys""" | def main(self): """Main method, entry point for the analisys""" | 37,732 |
def main(self): """Main method, entry point for the analisys""" | def main(self): """Main method, entry point for the analisys""" | 37,733 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,734 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 37,735 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 37,736 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 37,737 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 37,738 |
def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, hint=False): """Iter on the list of actions and apply them one-by-one | 37,739 |
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 37,740 |
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 37,741 |
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 37,742 |
def iter_packages(self, packages, output): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, output): """Iter on the list of actions and apply them one-by-one | 37,743 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False, nuninst=None): """Iter on the list of actions and apply them one-by-one | 37,744 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,745 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,746 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,747 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,748 |
def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | def iter_packages(self, packages, selected, hint=False): """Iter on the list of actions and apply them one-by-one | 37,749 |
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 37,750 |
def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | def do_all(self, maxdepth=0, init=None, actions=None): """Testing update runner | 37,751 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,752 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,753 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,754 |
def unregister_conflicts(pkg, conflicts): for c in conflicts.keys(): if conflicts[c][3] == pkg: del conflicts[c] | def unregister_conflicts(pkg, conflicts): for c in conflicts.keys(): i = 0 while i < len(conflicts[c]): if conflicts[c][i][3] == pkg: del conflicts[c][i] else: i = i + 1 if len(conflicts[c]) == 0: del conflicts[c] | 37,755 |
def handle_conflict(pkg, source, system, conflicts): # reached the top of the tree if not system[source][1]: return False # remove its conflicts unregister_conflicts(source, conflicts) # if there are alternatives, try them alternatives = system[source][0] for alt in alternatives: if satisfy(alt, [x for x in alternative... | def handle_conflict(pkg, source, system, conflicts): # reached the top of the tree if not system[source][1]: return False # remove its conflicts unregister_conflicts(source, conflicts) # if there are alternatives, try them alternatives = system[source][0] for alt in alternatives: if satisfy(alt, [x for x in alternative... | 37,756 |
def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 37,757 |
def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 37,758 |
def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 37,759 |
def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 37,760 |
def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | def satisfy(pkg, pkg_alt=None, pkg_from=None, system=system, conflicts=conflicts, excluded=[]): # if it is real package and it is already installed, skip it and return True if pkg in binaries[0]: if pkg in system: return True binary_u = binaries[0][pkg] else: binary_u = None | 37,761 |
def eval_uninst(self, nuninst): res = "" for arch in self.options.architectures: if arch in nuninst and nuninst[arch] != []: res = res + " * %s: %s\n" % (arch, ", ".join(nuninst[arch])) return res | def eval_uninst(self, nuninst): res = "" for arch in self.options.architectures: if arch in nuninst and nuninst[arch] != []: res = res + " * %s: %s\n" % (arch, ", ".join(sorted(nuninst[arch]))) return res | 37,762 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,763 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,764 |
def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | 37,765 |
def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | 37,766 |
def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | 37,767 |
def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | def read_binaries(self, basedir, distribution, arch): """Read the list of binary packages from the specified directory The binary packages are read from the `Packages_${arch}' files within the directory specified as `basedir' parameter, replacing ${arch} with the value of the arch parameter. Considering the large amou... | 37,768 |
def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if not... | 37,769 |
def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p, None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if not... | 37,770 |
def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | def add_nuninst(pkg, arch): if pkg not in nuninst[arch]: nuninst[arch].append(pkg) for p in binaries[arch][0][pkg]['rdepends']: tpkg = binaries[arch][0][p[0]] if skip_archall and tpkg['architecture'] == 'all': continue r = excuse_unsat_deps(p[0], None, arch, 'testing', None, excluded=nuninst[arch], conflicts=False) if ... | 37,771 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,772 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,773 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,774 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,775 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,776 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,777 |
def doop_source(self, pkg): | def doop_source(self, pkg): | 37,778 |
def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend(map(operator.itemgetter(0), self.binaries[suite][arch][0][p]['rdepends'])) n = l return packages | def get_full_tree(self, pkg, arch, suite): packages = [pkg] l = n = 0 while len(packages) > l: l = len(packages) for p in packages[n:]: packages.extend([x for x in binaries[p]['rdepends'] if x not in packages and x in binaries]) n = l return packages | 37,779 |
def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | def iter_packages(self, packages, output): extra = [] nuninst_comp = self.get_nuninst() | 37,780 |
def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self.log = EinzelDateiLogger('debug.log') self._ver... | def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self.loger = EinzelDateiLogger('debug.log') self._v... | 37,781 |
def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | 37,782 |
def _teile_befehl(self,zeile): '''teilt Befehle in ein Dictionary auf: befehl['quelle']['host'],['ident'],['nick'] jeweils als string befehl['ziel'] string befehl['befehl'] string befehl['argumente'] liste | def _teile_befehl(self,zeile): '''teilt Befehle in ein Dictionary auf: befehl['quelle']['host'],['ident'],['nick'] jeweils als string befehl['ziel'] string befehl['befehl'] string befehl['argumente'] liste | 37,783 |
def cmd_die(self,*befehl): '''schaltet den Bot ab''' befehl = befehl[0] if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | def cmd_die(self,befehl): '''schaltet den Bot ab''' befehl = befehl[0] if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | 37,784 |
def cmd_die(self,*befehl): '''schaltet den Bot ab''' befehl = befehl[0] if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | def cmd_die(self,*befehl): '''schaltet den Bot ab''' if befehl['quelle']['ident'] == 'tiax': self.quit('diediedie') else: self.notice(befehl['quelle']['nick'],'Du darfst den Bot nicht abschalten') | 37,785 |
def cmd_ping(self,*befehl): '''antwortet mit pong''' if befehl['ziel'].startswith('#'): self.msg(befehl['ziel'],'Pong') else: self.notice(befehl['quelle']['nickname'],'Pong') | def cmd_ping(self,befehl): '''antwortet mit pong''' if befehl['ziel'].startswith('#'): self.msg(befehl['ziel'],'Pong') else: self.notice(befehl['quelle']['nickname'],'Pong') | 37,786 |
def rawsend(self,rausgehendes): '''schickt Daten an den Server erwartet: das, was geschickt werden soll gibt auch nix zurck, erspart uns aber die lstige Fehlersuche, wenn die Zeichen am Zeilenende vergessen worden sind.''' self.so.send('%s\r\n' % rausgehendes) self.log.log('Rausgehend','Raw: %s' % rausgehendes) | def rawsend(self,rausgehendes): '''schickt Daten an den Server erwartet: das, was geschickt werden soll gibt auch nix zurck, erspart uns aber die lstige Fehlersuche, wenn die Zeichen am Zeilenende vergessen worden sind.''' self.so.send('%s\r\n' % rausgehendes) self.log.log('Rausgehend','Raw: %s' % rausgehendes) | 37,787 |
def join(self,channel,key=''): '''betritt Channel''' self.log.log('Verbindung','Channel %s betreten' % channel) self.rawsend('JOIN %s %s' % (channel, key)) | def join(self,channel,key=''): '''betritt Channel''' self.loger.log('Verbindung','Channel %s betreten' % channel) self.rawsend('JOIN %s %s' % (channel, key)) | 37,788 |
def msg(self,ziel,nachricht): '''schickt Nachrichten raus''' self.rawsend('PRIVMSG %s :%s' % (ziel, nachricht)) self.log('Rausgehendes','Message an %s:' % befehl['ziel']) | def msg(self,ziel,nachricht): '''schickt Nachrichten raus''' self.rawsend('PRIVMSG %s :%s' % (ziel, nachricht)) self.log('Rausgehendes','Message an %s:' % befehl['ziel']) | 37,789 |
def notice(self,ziel,nachricht): '''schickt eine Nachricht als Notice raus''' self.rawsend('NOTICE %s :%s' % (ziel,nachricht)) self.log.log('Rausgehendes','Notice an %s:' % befehl['ziel']) | def notice(self,ziel,nachricht): '''schickt eine Nachricht als Notice raus''' self.rawsend('NOTICE %s :%s' % (ziel,nachricht)) self.log.log('Rausgehendes','Notice an %s:' % befehl['ziel']) | 37,790 |
def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') e... | def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.loger.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen')... | 37,791 |
def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') e... | def on_433(self,zeile): ''' der nickname ist bereits belegt wir holen jetzt weitere nicks aus der anfangs erstellten Liste. Falls die leer wird, beenden wir den Bot''' try: self.currentnickname = self.nicknames.pop(0) except IndexError: self.log.log('Verbindung','Nickname bereits belegt, alle Nicks sind ausgegangen') e... | 37,792 |
def on_001(self,zeile): '''die IRC Verbindung ist gerade hergestellt worden Das ist die ideale Gelegenheit, am Anfang auszufuehrende Befehle einzugeben''' self.log.log('Verbindung','Verbindung hergestellt') print "Verbindung hergestellt" pass | def on_001(self,zeile): '''die IRC Verbindung ist gerade hergestellt worden Das ist die ideale Gelegenheit, am Anfang auszufuehrende Befehle einzugeben''' self.loger.log('Verbindung','Verbindung hergestellt') print "Verbindung hergestellt" pass | 37,793 |
def on_PRIVMSG(self,zeile): '''bearbeitet eingehende Nachrichten''' if zeile['inhalt'][0].startswith(self.currentnickname) or zeile['ziel'] == self.currentnickname: # der bot wird entweder angesprochen oder er kriegt eine private message self._teile_befehl(zeile) self.log.log('Nachricht','%s <%s!%s@%s> %s' % (zeile['zi... | def on_PRIVMSG(self,zeile): '''bearbeitet eingehende Nachrichten''' if zeile['inhalt'][0].startswith(self.currentnickname) or zeile['ziel'] == self.currentnickname: # der bot wird entweder angesprochen oder er kriegt eine private message self._teile_befehl(zeile) self.loger.log('Nachricht','%s <%s!%s@%s> %s' % (zeile['... | 37,794 |
def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self._verbinde(server,nickname,ident,realname) # gl... | def __init__(self,server,nickname,ident=None,realname=None): '''gleich verbinden, wenn die klasse erstellt wird''' self._lesebuffer = '' # wir brauchen einen leeren Buffer, in den geschrieben wird. Ein Buffer wird gebraucht, weil nicht alles sofort ankommt bei lag usw self._verbinde(server,nickname,ident,realname) # gl... | 37,795 |
def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | 37,796 |
def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | def _verbinde(self,server,nickname,ident=None,realname=None): '''stellt die Verbindung zum Server her erwartet: server entweder als string (url) oder tuple (url, port) nickname als liste von nicknames ident als string realname als string | 37,797 |
def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | 37,798 |
def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | def _verarbeite_reingehendes(self): '''liest den Buffer aus und verteilt das Reingehende auf die Funktionen erwartet: garnix gibt auch nix zurck, aber liest immer 1024 bytes ein und tut sie zum buffer dazu. die letzte zeile wird wieder zurck in den buffer getan und erst nchste mal verarbeitet, weil vielleicht nicht die... | 37,799 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.