From 3708b30a78d636795c063f720ff1f1e9fe3f2b06 2021-07-14 09:52:18 From: Eyenpi Date: 2021-07-14 09:52:18 Subject: [PATCH] remove the unneeded if statment --- diff --git a/IPython/core/magics/code.py b/IPython/core/magics/code.py index 23709d0..82ce71b 100644 --- a/IPython/core/magics/code.py +++ b/IPython/core/magics/code.py @@ -270,15 +270,14 @@ class CodeMagics(Magics): return expiry_days = 7 - if "e" in opts: - try: - expiry_days = int(opts.get("e", 7)) - except ValueError as e: - print(e.args[0].capitalize()) - return - if expiry_days < 1 or expiry_days > 365: - print("Expiry days should be in range of 1 to 365") - return + try: + expiry_days = int(opts.get("e", 7)) + except ValueError as e: + print(e.args[0].capitalize()) + return + if expiry_days < 1 or expiry_days > 365: + print("Expiry days should be in range of 1 to 365") + return post_data = urlencode( {