Skip to content

some exception handling and hints what fails would be nice #203

@ksuess

Description

@ksuess

a simple print(option) helps to see what fails.

A simple exception handling of parsing would decrease frustration. For example here no comments are allowed and break the build run: mr.developer-2.0.1-py3.8.egg/mr/developer/extension.py", line 107, in get_sources
key, value = option.split('=', 1)

[sources]
collective.fancyaddon = git [email protected]:/ksuess/collective.fancyaddon.git # forked!

do not comment here!

An internal error occurred due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/Users/batman/schnupsi/work/zope/lib/python3.8/site-packages/zc/buildout/buildout.py", line 2174, in main
    getattr(buildout, command)(args)
  File "/Users/batman/schnupsi/work/zope/lib/python3.8/site-packages/zc/buildout/buildout.py", line 658, in install
    self._load_extensions()
  File "/Users/batman/schnupsi/work/zope/lib/python3.8/site-packages/zc/buildout/buildout.py", line 1194, in _load_extensions
    ep.load()(self)
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/extension.py", line 296, in extension
    return Extension(buildout)()
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/extension.py", line 255, in __call__
    auto_checkout = self.get_auto_checkout()
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/common.py", line 98, in g
    value = f(*args, **kwargs)
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/extension.py", line 149, in get_auto_checkout
    packages = set(self.get_sources().keys())
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/common.py", line 98, in g
    value = f(*args, **kwargs)
  File "/Users/batman/schnupsi/work/eggs/mr.developer-2.0.1-py3.8.egg/mr/developer/extension.py", line 107, in get_sources
    key, value = option.split('=', 1)
ValueError: not enough values to unpack (expected 2, got 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions