소스 검색

import IntegrityError used as base class with according name

This not only brings code style in line with the other helpers that do the
same thing this way, but also does away with an unnecessary absolute import
using the borg module name explicitly.
Elmar Hoffmann 3 년 전
부모
커밋
c34df51e3e
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      src/borg/helpers/errors.py

+ 2 - 2
src/borg/helpers/errors.py

@@ -1,6 +1,6 @@
 from ..constants import *  # NOQA
 
-import borg.crypto.low_level
+from ..crypto.low_level import IntegrityError as IntegrityErrorBase
 
 
 class Error(Exception):
@@ -30,7 +30,7 @@ class ErrorWithTraceback(Error):
     traceback = True
 
 
-class IntegrityError(ErrorWithTraceback, borg.crypto.low_level.IntegrityError):
+class IntegrityError(ErrorWithTraceback, IntegrityErrorBase):
     """Data integrity error: {}"""