Skip to content

Upgrade for Inkscape 1.0#1

Open
vmario89 wants to merge 4 commits intoWandmalfarbe:masterfrom
vmario89:master
Open

Upgrade for Inkscape 1.0#1
vmario89 wants to merge 4 commits intoWandmalfarbe:masterfrom
vmario89:master

Conversation

@vmario89
Copy link
Copy Markdown

@vmario89 vmario89 commented Aug 2, 2020

No description provided.

@Wandmalfarbe Wandmalfarbe changed the title Upgrade for InkScape 1.0 Upgrade for Inkscape 1.0 Aug 3, 2020
@Wandmalfarbe
Copy link
Copy Markdown
Owner

Thank you for this contribution!

Copy link
Copy Markdown
Owner

@Wandmalfarbe Wandmalfarbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also change the lines

        # show an error message and exit if the bouwkamp code is invalid
        try:
            self.exception_on_invalid_bouwkamp_code(bouwkamp_code)
        except ValueError as exception:
            inkex.errormsg(_(exception.message))
            return

to

        # show an error message and exit if the bouwkamp code is invalid
        try:
            self.exception_on_invalid_bouwkamp_code(bouwkamp_code)
        except ValueError as exception:
            inkex.errormsg(_(str(exception)))
            return

to make it Python 3 compliant. The class ValueError has no attribute message anymore.

default='21, 112, 112, [50, 35, 27], [8, 19], [15, 17, ' +
'11], [6, 24], [29, 25, 9, 2], [7, 18], [16], [42], [4, 37], [33]',
help='The Bouwkamp code.'
self.arg_parser.add_argument('--tab')
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please restore the original indentation and line wrapping on the add_argument-calls.

'11], [6, 24], [29, 25, 9, 2], [7, 18], [16], [42], [4, 37], [33]',
help='The Bouwkamp code.'
self.arg_parser.add_argument('--tab')
self.arg_parser.add_argument('--bouwkamp_code', default='21, 112, 112, [50, 35, 27], [8, 19], [15, 17, 11], [6, 24], [29, 25, 9, 2], [7, 18], [16], [42], [4, 37], [33]', help='The Bouwkamp code.'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct argument name is --bouwkamp-code.

dest='wrap_in_group',
default=True,
help='Should the generated items be wrapped inside a group.'
self.arg_parser.add_argument('--wrap_in_group', type=inkex.Boolean, default=True, help='Should the generated items be wrapped inside a group.'
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The correct argument name is --wrap-in-group.

@@ -2,14 +2,10 @@
<inkscape-extension xmlns="http://www.inkscape.org/namespace/inkscape/extension">
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert this commit. The parameter names bouwkamp-code and wrap-in-group were correct and should not be changed.

<submenu _name="Render"/>
<submenu _name="FabLab Chemnitz">
<submenu _name="Render"/>
</submenu>
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not correct. The previous code was correct.

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.

2 participants