Browse Source

Fix errors in migration that cause abnormal exit.

Stefano Cossu 5 years ago
parent
commit
6a432670ad
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lakesuperior/migrator.py

+ 2 - 2
lakesuperior/migrator.py

@@ -232,11 +232,11 @@ class Migrator:
         # Get the whole RDF document now because we have to know all outbound
         # links.
         get_uri = (
-                uri if ldp_type == 'ldp_rs' else '{}/fcr:metadata'.format(uri))
+                uri if ldp_type == 'ldp_rs' else f'{uri}/fcr:metadata')
         try:
             get_rsp = requests.get(get_uri, auth=self.auth)
             get_rsp.raise_for_status()
-        except:
+        except Exception as e:
             if self.skip_errors:
                 logger.error(f'Error retrieving resource body: {e}')
                 return