Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
wRAR committed Sep 27, 2023
1 parent 71f2b8c commit 4d4c5ac
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sh_scrapy/commands/shub_image_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from __future__ import print_function
import json
import subprocess
import sys

from scrapy.commands import ScrapyCommand

Expand Down Expand Up @@ -40,6 +39,9 @@ def run(self, args, opts):
}
try:
from scrapy_spider_metadata import get_spider_metadata
except ImportError:
pass

Check warning on line 43 in sh_scrapy/commands/shub_image_info.py

View check run for this annotation

Codecov / codecov/patch

sh_scrapy/commands/shub_image_info.py#L40-L43

Added lines #L40 - L43 were not covered by tests
else:
result['metadata'] = {}
for spider_name in result['spiders']:
spider_cls = self.crawler_process.spider_loader.load(spider_name)
Expand All @@ -50,8 +52,6 @@ def run(self, args, opts):
except (TypeError, ValueError):
continue
result['metadata'][spider_name] = metadata_dict

Check warning on line 54 in sh_scrapy/commands/shub_image_info.py

View check run for this annotation

Codecov / codecov/patch

sh_scrapy/commands/shub_image_info.py#L51-L54

Added lines #L51 - L54 were not covered by tests
except ImportError:
pass
if opts.debug:
output = subprocess.check_output(
['bash', '-c', self.IMAGE_INFO_CMD],
Expand Down

0 comments on commit 4d4c5ac

Please sign in to comment.