1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-10-03 17:50:11 +02:00

fix "local variable 'e' is assigned to but never used"

This commit is contained in:
Hans-Christoph Steiner 2018-05-25 12:32:34 +02:00
parent 14127bf418
commit fb02073cab
3 changed files with 3 additions and 3 deletions

2
fdroid
View File

@ -156,7 +156,7 @@ def main():
# str(e) often doesn't contain a reason, so just show the backtrace # str(e) often doesn't contain a reason, so just show the backtrace
except Exception as e: except Exception as e:
logging.critical(_("Unknown exception found!")) logging.critical(_("Unknown exception found!"))
raise raise e
sys.exit(0) sys.exit(0)

View File

@ -83,7 +83,7 @@ def main():
logging.info("...retrieving " + url) logging.info("...retrieving " + url)
try: try:
net.download_file(url, dldir=tmp_dir) net.download_file(url, dldir=tmp_dir)
except requests.exceptions.HTTPError as e: except requests.exceptions.HTTPError:
try: try:
net.download_file(url.replace('/repo', '/archive'), dldir=tmp_dir) net.download_file(url.replace('/repo', '/archive'), dldir=tmp_dir)
except requests.exceptions.HTTPError as e: except requests.exceptions.HTTPError as e:

View File

@ -74,7 +74,7 @@ config = {
if os.path.isfile('/usr/bin/systemd-detect-virt'): if os.path.isfile('/usr/bin/systemd-detect-virt'):
try: try:
virt = subprocess.check_output('/usr/bin/systemd-detect-virt').strip().decode('utf-8') virt = subprocess.check_output('/usr/bin/systemd-detect-virt').strip().decode('utf-8')
except subprocess.CalledProcessError as e: except subprocess.CalledProcessError:
virt = 'none' virt = 'none'
if virt == 'qemu' or virt == 'kvm' or virt == 'bochs': if virt == 'qemu' or virt == 'kvm' or virt == 'bochs':
logger.info('Running in a VM guest, defaulting to QEMU/KVM via libvirt') logger.info('Running in a VM guest, defaulting to QEMU/KVM via libvirt')