This commit is contained in:
Miroslav Stampar
2020-12-31 12:00:13 +01:00
parent 82e28e038e
commit 2cf2dd9a2c
2 changed files with 6 additions and 2 deletions

View File

@@ -430,7 +430,11 @@ def _setStdinPipeTargets():
return self.next()
def next(self):
line = next(conf.stdinPipe)
try:
line = next(conf.stdinPipe)
except (IOError, OSError):
line = None
if line:
match = re.search(r"\b(https?://[^\s'\"]+|[\w.]+\.\w{2,3}[/\w+]*\?[^\s'\"]+)", line, re.I)
if match: