From 0c74034f4dd526e900f002d4930e11383a90dba0 Mon Sep 17 00:00:00 2001 From: Robert Jordens Date: Tue, 3 May 2016 18:07:43 +0200 Subject: [PATCH] browser: tiny simplification --- artiq/browser/files.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/artiq/browser/files.py b/artiq/browser/files.py index 8f6711735..32b2b1424 100644 --- a/artiq/browser/files.py +++ b/artiq/browser/files.py @@ -14,12 +14,10 @@ def open_h5(info): info.suffix() == "h5"): return try: - f = h5py.File(info.filePath(), "r") + return h5py.File(info.filePath(), "r") except: logger.warning("unable to read HDF5 file %s", info.filePath(), exc_info=True) - return - return f class ThumbnailIconProvider(QtWidgets.QFileIconProvider):