From 6f7f29d6846a57e8730406f1d4d8fe054538348e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20F=C3=A4hrmann?= Date: Thu, 14 Jul 2016 14:25:56 +0200 Subject: [PATCH] rename a few files --- gallery_dl/__init__.py | 8 ++++---- gallery_dl/{exceptions.py => exception.py} | 0 gallery_dl/{jobs.py => job.py} | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) rename gallery_dl/{exceptions.py => exception.py} (100%) rename gallery_dl/{jobs.py => job.py} (98%) diff --git a/gallery_dl/__init__.py b/gallery_dl/__init__.py index c966e9ea..88035250 100644 --- a/gallery_dl/__init__.py +++ b/gallery_dl/__init__.py @@ -16,7 +16,7 @@ __email__ = "mike_faehrmann@web.de" import os import argparse -from . import config, extractor, jobs +from . import config, extractor, job def build_cmdline_parser(): parser = argparse.ArgumentParser( @@ -81,11 +81,11 @@ def main(): if not args.urls: parser.error("the following arguments are required: URL") if args.list_urls: - jobtype = jobs.UrlJob + jobtype = job.UrlJob elif args.list_keywords: - jobtype = jobs.KeywordJob + jobtype = job.KeywordJob else: - jobtype = jobs.DownloadJob + jobtype = job.DownloadJob for url in args.urls: jobtype(url).run() except KeyboardInterrupt: diff --git a/gallery_dl/exceptions.py b/gallery_dl/exception.py similarity index 100% rename from gallery_dl/exceptions.py rename to gallery_dl/exception.py diff --git a/gallery_dl/jobs.py b/gallery_dl/job.py similarity index 98% rename from gallery_dl/jobs.py rename to gallery_dl/job.py index d859f9cd..6217eeee 100644 --- a/gallery_dl/jobs.py +++ b/gallery_dl/job.py @@ -9,7 +9,7 @@ import os import json import hashlib -from . import config, extractor, downloader, text, output, exceptions +from . import config, extractor, downloader, text, output, exception from .extractor.message import Message class Job(): @@ -18,7 +18,7 @@ class Job(): def __init__(self, url): self.extractor = extractor.find(url) if self.extractor is None: - raise exceptions.NoExtractorError(url) + raise exception.NoExtractorError(url) def run(self): """Execute or run the job""" @@ -80,7 +80,7 @@ class DownloadJob(Job): for url in self.queue: try: DownloadJob(url).run() - except exceptions.NoExtractorError: + except exception.NoExtractorError: pass def download(self, msg):