plone / bobtemplates.plone

Python Code Templates for Plone Projects with mr.bob
https://pypi.org/project/bobtemplates.plone/
GNU General Public License v2.0
24 stars 31 forks source link

Bare except in restapi_service - flake8 fails immediately #432

Closed jensens closed 4 years ago

jensens commented 4 years ago
$ plonecli add restapi_service

RUN: mrbob bobtemplates.plone:restapi_service

Welcome to mr.bob interactive mode. Before we generate directory structure, some questions need to be answered.

Answer with a question mark to display help.
Values in square brackets at the end of the questions show the default value if there is no answer.

RUN: git status --porcelain --ignore-submodules
Git state is clean.

--> Service class name [RelatedThings]: Bookmark

--> Service name [bookmark]: 

>>> reading Plone version from bobtemplate.cfg

rename example zcml file
rename example zcml file
Should we run?:
git add .
git commit -m "Add restapi_service: bookmark"
in: /home/jensens/ws/pro/agitator/collective.bookmarks
[y]/n: y
RUN: git add .
RUN: git commit -m "Add restapi_service: bookmark"
Flake8..........................[ FAILURE ] in 0.180s
/home/jensens/ws/pro/agitator/collective.bookmarks/src/collective/bookmarks/api/services/bookmark/get.py:34:9: E722 do not use bare 'except'
b'[master 2b6249e] "Add restapi_service: bookmark"\n 9 files changed, 102 insertions(+), 1 deletion(-)\n create mode 100644 src/collective/bookmarks/api/__init__.py\n create mode 100644 src/collective/bookmarks/api/configure.zcml\n create mode 100644 src/collective/bookmarks/api/services/__init__.py\n create mode 100644 src/collective/bookmarks/api/services/bookmark/__init__.py\n create mode 100644 src/collective/bookmarks/api/services/bookmark/configure.zcml\n create mode 100644 src/collective/bookmarks/api/services/bookmark/get.py\n create mode 100644 src/collective/bookmarks/api/services/configure.zcml\n'
Generated file structure at /home/jensens/ws/pro/agitator/collective.bookmarks