|
1 | | -# Copyright (c) nexB Inc. and others. All rights reserved. |
2 | | -# http://nexb.com and https://github.com/nexB/container-inspector/ |
3 | 1 | # |
4 | | -# This software is licensed under the Apache License version 2.0.# |
| 2 | +# Copyright (c) nexB Inc. and others. All rights reserved. |
| 3 | +# SPDX-License-Identifier: Apache-2.0 |
| 4 | +# See http://www.apache.org/licenses/LICENSE-2.0 for the license text. |
| 5 | +# See https://github.com/nexB/container-inspector for support or download. |
| 6 | +# See https://aboutcode.org for more information about nexB OSS projects. |
5 | 7 | # |
6 | | -# You may not use this software except in compliance with the License. |
7 | | -# You may obtain a copy of the License at: |
8 | | -# http://apache.org/licenses/LICENSE-2.0 |
9 | | -# Unless required by applicable law or agreed to in writing, software distributed |
10 | | -# under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR |
11 | | -# CONDITIONS OF ANY KIND, either express or implied. See the License for the |
12 | | -# specific language governing permissions and limitations under the License. |
13 | 8 |
|
14 | | -import csv as csv_module |
15 | | -import json as json_module |
16 | 9 | import logging |
17 | 10 | import os |
18 | | -from os import path |
19 | 11 | import sys |
20 | 12 | import tempfile |
| 13 | +import csv as csv_module |
| 14 | +import json as json_module |
| 15 | +from os import path |
21 | 16 |
|
22 | 17 | import click |
23 | 18 |
|
24 | 19 | from container_inspector import image |
25 | 20 | from container_inspector import dockerfile |
26 | 21 | from container_inspector import rootfs |
27 | 22 |
|
| 23 | +TRACE = False |
28 | 24 | logger = logging.getLogger(__name__) |
29 | | -# un-comment these lines to enable logging |
30 | | -# logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) |
31 | | -# logger.setLevel(logging.DEBUG) |
| 25 | +if TRACE: |
| 26 | + logging.basicConfig(level=logging.DEBUG, stream=sys.stdout) |
| 27 | + logger.setLevel(logging.DEBUG) |
32 | 28 |
|
33 | 29 |
|
34 | 30 | @click.command() |
|
0 commit comments