| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 581a95f commit dd10afc
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,8 +19,8 @@ def abspath(*args): | |||
| 19 | 19 | return os.path.abspath(path) | |
| 20 | 20 | ||
| 21 | 21 | def load_config(): | |
| 22 | - s = open('config.gypi').read() | ||
| 23 | - return ast.literal_eval(s) | ||
| 22 | + with open('config.gypi') as f: | ||
| 23 | + return ast.literal_eval(f.read()) | ||
| 24 | 24 | ||
| 25 | 25 | def try_unlink(path): | |
| 26 | 26 | try: | |
@@ -223,11 +223,19 @@ def run(args): | |||
| 223 | 223 | cmd = args[1] if len(args) > 1 else 'install' | |
| 224 | 224 | ||
| 225 | 225 | if os.environ.get('HEADERS_ONLY'): | |
| 226 | - if cmd == 'install': return headers(install) | ||
| 227 | - if cmd == 'uninstall': return headers(uninstall) | ||
| 226 | + if cmd == 'install': | ||
| 227 | + headers(install) | ||
| 228 | + return | ||
| 229 | + if cmd == 'uninstall': | ||
| 230 | + headers(uninstall) | ||
| 231 | + return | ||
| 228 | 232 | else: | |
| 229 | - if cmd == 'install': return files(install) | ||
| 230 | - if cmd == 'uninstall': return files(uninstall) | ||
| 233 | + if cmd == 'install': | ||
| 234 | + files(install) | ||
| 235 | + return | ||
| 236 | + if cmd == 'uninstall': | ||
| 237 | + files(uninstall) | ||
| 238 | + return | ||
| 231 | 239 | ||
| 232 | 240 | raise RuntimeError('Bad command: %s\n' % cmd) | |
| 233 | 241 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments