From 9ecd5cc188487f6823fb450d1ef4aa3f97fcef7b Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Thu, 22 Jan 2009 09:35:12 +0100 Subject: fix incorrect indent --- aptsources/distro.py | 60 ++++++++++++++++++++++++++-------------------------- debian/changelog | 1 + 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/aptsources/distro.py b/aptsources/distro.py index 56e95339..36ab0ff8 100644 --- a/aptsources/distro.py +++ b/aptsources/distro.py @@ -307,42 +307,42 @@ class Distribution: source.comps.append(comp) comps_per_dist[source.dist].add(comp) - sources = [] - sources.extend(self.main_sources) - sources.extend(self.child_sources) - # store what comps are enabled already per distro (where distro is - # e.g. "dapper", "dapper-updates") - comps_per_dist = {} - comps_per_sdist = {} - for s in sources: - if s.type == self.binary_type: - if s.dist not in comps_per_dist: - comps_per_dist[s.dist] = set() + sources = [] + sources.extend(self.main_sources) + sources.extend(self.child_sources) + # store what comps are enabled already per distro (where distro is + # e.g. "dapper", "dapper-updates") + comps_per_dist = {} + comps_per_sdist = {} + for s in sources: + if s.type == self.binary_type: + if s.dist not in comps_per_dist: + comps_per_dist[s.dist] = set() map(comps_per_dist[s.dist].add, s.comps) - for s in self.source_code_sources: - if s.type == self.source_type: - if s.dist not in comps_per_sdist: - comps_per_sdist[s.dist] = set() + for s in self.source_code_sources: + if s.type == self.source_type: + if s.dist not in comps_per_sdist: + comps_per_sdist[s.dist] = set() map(comps_per_sdist[s.dist].add, s.comps) - # check if there is a main source at all - if len(self.main_sources) < 1: + # check if there is a main source at all + if len(self.main_sources) < 1: + # create a new main source + self.add_source(comps=["%s"%comp]) + else: + # add the comp to all main, child and source code sources + for source in sources: + add_component_only_once(source, comps_per_dist) + + # check if there is a main source code source at all + if self.get_source_code == True: + if len(self.source_code_sources) < 1: # create a new main source - self.add_source(comps=["%s"%comp]) + self.add_source(type=self.source_type, comps=["%s"%comp]) else: # add the comp to all main, child and source code sources - for source in sources: - add_component_only_once(source, comps_per_dist) - - # check if there is a main source code source at all - if self.get_source_code == True: - if len(self.source_code_sources) < 1: - # create a new main source - self.add_source(type=self.source_type, comps=["%s"%comp]) - else: - # add the comp to all main, child and source code sources - for source in self.source_code_sources: - add_component_only_once(source, comps_per_sdist) + for source in self.source_code_sources: + add_component_only_once(source, comps_per_sdist) def disable_component(self, comp): """ diff --git a/debian/changelog b/debian/changelog index 8868468a..400b15f5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ python-apt (0.7.9~exp3) experimental; urgency=low * aptsources/distro.py: - use iso_3166.xml instead of iso_3166.tab + - fix incorrect indent * debian/control: - add Recommends to iso-codes (for iso_3166.xml) -- cgit v1.2.3