X Tutup
Skip to content

Commit fb372e3

Browse files
committed
Refactor
1 parent cf6c550 commit fb372e3

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

bpython/paste.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,16 @@ def paste(self, s):
9696

9797
if not paste_url:
9898
raise PasteFailed(_("No output from helper program."))
99-
else:
100-
parsed_url = urlparse(paste_url)
101-
if not parsed_url.scheme or any(
102-
unicodedata.category(c) == "Cc" for c in paste_url
103-
):
104-
raise PasteFailed(
105-
_(
106-
"Failed to recognize the helper "
107-
"program's output as an URL."
108-
)
99+
100+
parsed_url = urlparse(paste_url)
101+
if not parsed_url.scheme or any(
102+
unicodedata.category(c) == "Cc" for c in paste_url
103+
):
104+
raise PasteFailed(
105+
_(
106+
"Failed to recognize the helper "
107+
"program's output as an URL."
109108
)
109+
)
110110

111111
return paste_url, None

0 commit comments

Comments
 (0)
X Tutup