Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only output traceback if verbosity level > 2 #609

Merged
merged 1 commit into from
Feb 7, 2020

Conversation

homebysix
Copy link
Member

Resolves #608

@nmcspadden
Copy link
Contributor

Same thing I always ask for:
Please show output demonstrating the change.

@homebysix
Copy link
Member Author

Here's the verbose output before:

% autopkg run -vv EasyCrop.download.recipe
Processing EasyCrop.download.recipe...
WARNING: EasyCrop.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
DeprecationWarning
{'Input': {}}
DeprecationWarning: ### This recipe has been deprecated. It may be removed soon. ###
{'Output': {'deprecation_summary_result': {'data': {'name': 'EasyCrop.download',
                                                    'warning': '### This '
                                                               'recipe has '
                                                               'been '
                                                               'deprecated. It '
                                                               'may be removed '
                                                               'soon. ###'},
                                           'report_fields': ['name', 'warning'],
                                           'summary_text': 'The following '
                                                           'recipes have '
                                                           'deprecation '
                                                           'warnings:'}}}
SparkleUpdateInfoProvider
{'Input': {'appcast_url': 'https://yellowmug.com/easycrop/appcast.xml'}}
SparkleUpdateInfoProvider: Version retrieved from appcast: 2.4.5
SparkleUpdateInfoProvider: Found URL http://yellowmug.com/download/EasyCrop_2.4.5.dmg
{'Output': {'url': 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg',
            'version': '2.4.5'}}
URLDownloader
{'Input': {'filename': 'EasyCrop-2.4.5.dmg',
           'url': 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 189, in execute_curl
    text=text,
  File "/Library/AutoPkg/Python3/Python.framework/Versions/Current/lib/python3.7/subprocess.py", line 512, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmppndv18x4']' returned non-zero exit status 22.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Library/AutoPkg/autopkglib/__init__.py", line 673, in process
    self.env = processor.process()
  File "/Library/AutoPkg/autopkglib/__init__.py", line 480, in process
    self.main()
  File "/Library/AutoPkg/autopkglib/URLDownloader.py", line 328, in main
    raw_headers = self.download_with_curl(curl_cmd)
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 197, in download_with_curl
    proc_stdout, proc_stderr, retcode = self.execute_curl(curl_cmd, text)
  File "/Library/AutoPkg/autopkglib/URLGetter.py", line 192, in execute_curl
    raise ProcessorError(e)
autopkglib.ProcessorError: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmppndv18x4']' returned non-zero exit status 22.
  File "/Library/AutoPkg/autopkglib/__init__.py", line 673, in process
    self.env = processor.process()
Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmppndv18x4']' returned non-zero exit status 22.
Failed.
Receipt written to ~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/receipts/EasyCrop.download-receipt-20200128-110930.plist

The following recipes failed:
    EasyCrop.download.recipe
        Error in com.github.homebysix.download.EasyCrop: Processor: URLDownloader: Error: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmppndv18x4']' returned non-zero exit status 22.

The following recipes have deprecation warnings:
    Name               Warning
    ----               -------
    EasyCrop.download  ### This recipe has been deprecated. It may be removed soon. ###

And here's after:

% autopkg run -vv EasyCrop.download.recipe
Processing EasyCrop.download.recipe...
WARNING: EasyCrop.download.recipe is missing trust info and FAIL_RECIPES_WITHOUT_TRUST_INFO is not set. Proceeding...
DeprecationWarning
{'Input': {}}
DeprecationWarning: ### This recipe has been deprecated. It may be removed soon. ###
{'Output': {'deprecation_summary_result': {'data': {'name': 'EasyCrop.download',
                                                    'warning': '### This '
                                                               'recipe has '
                                                               'been '
                                                               'deprecated. It '
                                                               'may be removed '
                                                               'soon. ###'},
                                           'report_fields': ['name', 'warning'],
                                           'summary_text': 'The following '
                                                           'recipes have '
                                                           'deprecation '
                                                           'warnings:'}}}
SparkleUpdateInfoProvider
{'Input': {'appcast_url': 'https://yellowmug.com/easycrop/appcast.xml'}}
SparkleUpdateInfoProvider: Version retrieved from appcast: 2.4.5
SparkleUpdateInfoProvider: Found URL http://yellowmug.com/download/EasyCrop_2.4.5.dmg
{'Output': {'url': 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg',
            'version': '2.4.5'}}
URLDownloader
{'Input': {'filename': 'EasyCrop-2.4.5.dmg',
           'url': 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg'}}
URLDownloader: No value supplied for prefetch_filename, setting default value of: False
URLDownloader: No value supplied for CHECK_FILESIZE_ONLY, setting default value of: False
Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmpwojz01wl']' returned non-zero exit status 22.
Failed.
Receipt written to ~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/receipts/EasyCrop.download-receipt-20200128-112006.plist

The following recipes failed:
    EasyCrop.download.recipe
        Error in com.github.homebysix.download.EasyCrop: Processor: URLDownloader: Error: Command '['/usr/bin/curl', '--silent', '--show-error', '--no-buffer', '--dump-header', '-', '--speed-time', '30', '--location', '--url', 'http://yellowmug.com/download/EasyCrop_2.4.5.dmg', '--fail', '--output', '~/Library/AutoPkg/Cache/com.github.homebysix.download.EasyCrop/downloads/tmpwojz01wl']' returned non-zero exit status 22.

The following recipes have deprecation warnings:
    Name               Warning
    ----               -------
    EasyCrop.download  ### This recipe has been deprecated. It may be removed soon. ###

Here's the diff:
image

@nmcspadden nmcspadden merged commit b0d0931 into master Feb 7, 2020
@nmcspadden nmcspadden deleted the traceback-verbosity branch February 7, 2020 17:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Traceback in output when raising ProcessorError in AutoPkg 2.0rc1
2 participants