You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/08/23 16:34:14 UTC

[GitHub] [airflow] turbaszek commented on a change in pull request #10500: Make models/crypto.py Pylint-compatible

turbaszek commented on a change in pull request #10500:
URL: https://github.com/apache/airflow/pull/10500#discussion_r475239029



##########
File path: airflow/models/crypto.py
##########
@@ -85,7 +87,7 @@ def get_fernet():
                 for fernet_part in fernet_key.split(',')
             ])
             _fernet.is_encrypted = True
-    except (ValueError, TypeError) as ve:
-        raise AirflowException("Could not create Fernet object: {}".format(ve))
+    except (ValueError, TypeError) as value_error:
+        raise AirflowException("Could not create Fernet object: {}".format(value_error))

Review comment:
       ```suggestion
           raise AirflowException(f"Could not create Fernet object: {value_error}"))
   ```
   Let us use the occasion to introduce f-string 😄 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org