diff options
author | Michael Schroeder <mls@suse.de> | 2012-11-02 14:05:44 +0100 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2012-11-02 14:05:44 +0100 |
commit | 5839b7d92cb35c9169c0d7cca71f4216386c89ba (patch) | |
tree | 2b0678d8340c2b1787c9bf45563e41cf72048761 /examples/pysolv | |
parent | a6db1af2cdd7263bebe48d9342fdb032c413ee4f (diff) | |
download | libsolv-5839b7d92cb35c9169c0d7cca71f4216386c89ba.tar.gz libsolv-5839b7d92cb35c9169c0d7cca71f4216386c89ba.tar.bz2 libsolv-5839b7d92cb35c9169c0d7cca71f4216386c89ba.zip |
small cleanup: move incomplete check into writecachedrepo
Diffstat (limited to 'examples/pysolv')
-rwxr-xr-x | examples/pysolv | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/pysolv b/examples/pysolv index 238e3e8..d4c7265 100755 --- a/examples/pysolv +++ b/examples/pysolv @@ -238,6 +238,8 @@ class repo_generic(dict): return True def writecachedrepo(self, ext, info=None): + if not ext and 'incomplete' in self: + return try: if not os.path.isdir("/var/cache/solv"): os.mkdir("/var/cache/solv", 0755) @@ -334,8 +336,7 @@ class repo_repomd(repo_generic): self.handle.add_updateinfoxml(f, 0) solv.xfclose(f) self.add_exts() - if 'incomplete' not in self: - self.writecachedrepo(None) + self.writecachedrepo(None) # must be called after writing the repo self.handle.create_stubs() return True @@ -447,8 +448,7 @@ class repo_susetags(repo_generic): solv.xfclose(f) self.handle.internalize() self.add_exts() - if 'incomplete' not in self: - self.writecachedrepo(None) + self.writecachedrepo(None) # must be called after writing the repo self.handle.create_stubs() return True @@ -603,7 +603,7 @@ if os.path.isdir("/etc/zypp/repos.d"): else: reposdirs = [ "/etc/yum/repos.d" ] -for reposdir in ["/etc/zypp/repos.d"]: +for reposdir in reposdirs: if not os.path.isdir(reposdir): continue for reponame in sorted(glob.glob('%s/*.repo' % reposdir)): |