Home | History | Annotate | Download | only in bin

Lines Matching refs:cfg

19     def __init__(self, cfg, tmpdir='/tmp', raise_errors=False):
23 @param cfg: Where we'll get configuration data. It can be either:
36 if hasattr(cfg, 'read'):
37 self.cfg = cfg
38 self.parser.readfp(self.cfg)
39 elif isinstance(cfg, types.StringTypes):
41 if cfg.startswith('http') or cfg.startswith('ftp'):
42 self.cfg = path.join(tmpdir, path.basename(cfg))
43 utils.urlretrieve(cfg, self.cfg)
44 self.parser.read(self.cfg)
46 elif path.exists(path.abspath(cfg)):
47 if path.isfile(cfg):
48 self.cfg = path.abspath(cfg)
49 self.parser.read(self.cfg)
51 e_msg = 'Invalid config file path: %s' % cfg
56 self.cfg = StringIO(cfg)
57 self.parser.readfp(self.cfg)
75 'config file "%s".' % (option, self.cfg))
105 if not self.cfg:
107 fileobj = file(self.cfg, 'w')