Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -260,15 +260,15 @@ def check_resources() -> CheckResult:
)
if result.returncode == 0:
mem_gb = int(result.stdout.strip()) / (1024**3)
except:
except Exception:
pass

# Disk space (current directory)
disk_gb = 0
try:
statvfs = os.statvfs('.')
disk_gb = (statvfs.f_frsize * statvfs.f_bavail) / (1024**3)
except:
except Exception:
pass

details = f"CPUs: {cpu_count}, Memory: {mem_gb:.1f}GB, Disk: {disk_gb:.1f}GB available"
Expand Down Expand Up @@ -319,15 +319,15 @@ def check_network() -> CheckResult:
req = urllib.request.Request("https://hub.docker.com", headers=headers)
urllib.request.urlopen(req, timeout=10)
docker_hub_ok = True
except:
except Exception:
docker_hub_ok = False

# Try nf-core (for pipeline downloads)
try:
req = urllib.request.Request("https://nf-co.re", headers=headers)
urllib.request.urlopen(req, timeout=10)
nfcore_ok = True
except:
except Exception:
nfcore_ok = False

if docker_hub_ok and nfcore_ok:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def scan_directory(directory: str) -> Dict:
try:
size = os.path.getsize(os.path.join(root, filename))
info['total_size_gb'] += size / (1024**3)
except:
except Exception:
pass

return info
Expand Down