Răsfoiți Sursa

helpers: fix "undefined name 'e'" in exception handler

Thomas Waldmann 9 ani în urmă
părinte
comite
278cf0b9ad
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      borg/helpers.py

+ 1 - 1
borg/helpers.py

@@ -559,7 +559,7 @@ def format_line(format, data):
     except (KeyError, ValueError) as e:
     except (KeyError, ValueError) as e:
         # this should catch format errors
         # this should catch format errors
         print('Error in lineformat: "{}" - reason "{}"'.format(format, str(e)))
         print('Error in lineformat: "{}" - reason "{}"'.format(format, str(e)))
-    except:
+    except Exception as e:
         # something unexpected, print error and raise exception
         # something unexpected, print error and raise exception
         print('Error in lineformat: "{}" - reason "{}"'.format(format, str(e)))
         print('Error in lineformat: "{}" - reason "{}"'.format(format, str(e)))
         raise
         raise