mirror of
https://github.com/mikf/gallery-dl.git
synced 2025-02-01 03:51:42 +01:00
write error messages to stderr
This commit is contained in:
parent
3e8f70188f
commit
f17e49dcf2
@ -15,6 +15,7 @@ __maintainer__ = "Mike Fährmann"
|
||||
__email__ = "mike_faehrmann@web.de"
|
||||
|
||||
import os
|
||||
import sys
|
||||
import argparse
|
||||
import json
|
||||
from . import config, extractor, job, exception
|
||||
@ -74,7 +75,7 @@ def parse_option(opt):
|
||||
pass
|
||||
config.set(key.split("."), value)
|
||||
except ValueError:
|
||||
print("Invalid 'key=value' pair:", opt)
|
||||
print("Invalid 'key=value' pair:", opt, file=sys.stderr)
|
||||
|
||||
def main():
|
||||
try:
|
||||
@ -113,13 +114,14 @@ def main():
|
||||
try:
|
||||
jobtype(url).run()
|
||||
except exception.NoExtractorError:
|
||||
print("No suitable extractor found for URL '", url, "'", sep="")
|
||||
print("No suitable extractor found for URL '", url, "'",
|
||||
sep="", file=sys.stderr)
|
||||
except exception.AuthenticationError:
|
||||
print("Authentication failed. Please provide a valid "
|
||||
"username/password pair.")
|
||||
"username/password pair.", file=sys.stderr)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\nKeyboardInterrupt")
|
||||
print("\nKeyboardInterrupt", file=sys.stderr)
|
||||
except BrokenPipeError:
|
||||
pass
|
||||
except IOError as e:
|
||||
|
Loading…
x
Reference in New Issue
Block a user