log = logging.getLogger("pakfire.buildservice.config")
class PakfireConfig(base.Object):
- def init(self, distro, repos=None):
+ def init(self, distro=None, repos=None):
self.distro = distro
self.repos = set()
# Add all repositories belonging to the distribution
- for repo in self.distro.repos:
- self.add_repo(repo)
+ if self.distro:
+ for repo in self.distro.repos:
+ self.add_repo(repo)
# Add any repositories
if repos:
lines = []
# Add the distro configuration
- lines += self.distro._make_config(local=local)
+ if self.distro:
+ lines += self.distro._make_config(local=local)
# Add the repository configurations
for repo in self.repos: