2008/7/2 Shawn Walker <[EMAIL PROTECTED]>: > http://cr.opensolaris.org/~tmueller/cr-856/src/modules/client/imageconfig.py.wdiff.html > ========== > 132 139 cp.add_section("policy") > 133 140 for p in self.policies: > 134 141 cp.set("policy", p, str(self.policies[p])) > 135 142 > 143 + cp.add_section("property") > 144 + for p in self.properties: > 145 + cp.set("property", p, > str(self.properties[p])) > 146 + > 136 147 cp.add_section("filter") > 137 148 for f in self.filters: > 138 149 cp.set("filter", f, str(self.filters[f])) > > It looks like this could be condensed to something like (haven't tried this): > > for sname in ["policy", "property", "filter"]: > cp.add_section(sname) > attrs = self.getattr(self, sname) > for p in attrs: > cp.set(sname, p, str(attrs[p])
Ignore this. I just realised my error as I hit send. Doh. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
