Mercurial > hg > martINI
comparison martini/config.py @ 12:4faed08eb8d8
py35
author | Jeff Hammel <k0scist@gmail.com> |
---|---|
date | Mon, 20 Feb 2017 14:34:18 -0800 |
parents | c77259f467a3 |
children | 904bb82c3308 |
comparison
equal
deleted
inserted
replaced
11:c77259f467a3 | 12:4faed08eb8d8 |
---|---|
25 return resource | 25 return resource |
26 | 26 |
27 if os.path.exists(resource): | 27 if os.path.exists(resource): |
28 return file(resource) | 28 return file(resource) |
29 if sum([resource.startswith(http) | 29 if sum([resource.startswith(http) |
30 for http in 'http://', 'https://']): | 30 for http in ('http://', 'https://')]): |
31 return urllib2.urlopen(resource) | 31 return urllib2.urlopen(resource) |
32 return StringIO(resource) | 32 return StringIO(resource) |
33 | 33 |
34 | 34 |
35 class ConfigMunger(ConfigParser): | 35 class ConfigMunger(ConfigParser): |