소스 검색

qubespolicy: ease testing by calling str(target) only once

Don't call it multiple times depending on number of registered loggers.
Marek Marczykowski-Górecki 5 년 전
부모
커밋
890df9ba03
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      qubespolicy/cli.py

+ 1 - 1
qubespolicy/cli.py

@@ -130,7 +130,7 @@ def main(args=None):
                 action.handle_user_response(True, response)
             else:
                 action.handle_user_response(False)
-        log.info('%s allowed to %s', log_prefix, action.target)
+        log.info('%s allowed to %s', log_prefix, str(action.target))
         action.execute(caller_ident)
     except qubespolicy.PolicySyntaxError as e:
         log.error('%s error loading policy: %s', log_prefix, str(e))