1
0
Fork 0
mirror of synced 2024-06-25 17:40:50 +12:00

fix lgtm alerts

This commit is contained in:
Nick Sweeting 2021-04-06 13:47:26 -04:00
parent 21bb84f627
commit 2c07d8f1f3
2 changed files with 3 additions and 5 deletions

View file

@ -502,7 +502,7 @@ def write_config_file(config: Dict[str, str], out_dir: str=None) -> ConfigDict:
key.upper(): CONFIG.get(key.upper())
for key in config.keys()
}
except:
except BaseException:
# something went horribly wrong, rever to the previous version
with open(f'{config_path}.bak', 'r', encoding='utf-8') as old:
atomic_write(config_path, old.read())
@ -547,7 +547,7 @@ def load_config(defaults: ConfigDefaultDict,
stderr(' For config documentation and examples see:')
stderr(' https://github.com/ArchiveBox/ArchiveBox/wiki/Configuration')
stderr()
raise
# raise
raise SystemExit(2)
return extended_config
@ -1067,7 +1067,6 @@ def setup_django(out_dir: Path=None, check_db=False, config: ConfigDict=CONFIG,
assert isinstance(output_dir, Path) and isinstance(config['PACKAGE_DIR'], Path)
try:
import django
from django.core.management import call_command
sys.path.append(str(config['PACKAGE_DIR']))

View file

@ -157,7 +157,7 @@ class TimedProgress:
# kill the progress bar subprocess
try:
self.p.close() # must be closed *before* its terminnated
except:
except BaseException:
pass
self.p.terminate()
self.p.join()
@ -223,7 +223,6 @@ def progress_bar(seconds: int, prefix: str='') -> None:
# sys.stdout.flush()
except (KeyboardInterrupt, BrokenPipeError):
print()
pass
def log_cli_command(subcommand: str, subcommand_args: List[str], stdin: Optional[str], pwd: str):