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

Fix startup issues in python3 #30

Merged
merged 4 commits into from
Mar 22, 2018
Merged

Fix startup issues in python3 #30

merged 4 commits into from
Mar 22, 2018

Conversation

pbauer
Copy link
Member

@pbauer pbauer commented Jan 29, 2018

No description provided.

@pbauer pbauer changed the title Python3 Fix startup issues in python3 Jan 29, 2018
Copy link
Member

@mauritsvanrees mauritsvanrees left a comment

Choose a reason for hiding this comment

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

One comment about an exception that does not work.
For the rest: LGTM.

@@ -132,7 +132,7 @@ def getGroup(self):
bcontext = aq_base(parent)
bcontainer = aq_base(aq_parent(aq_inner(self)))
if bcontext is bcontainer or not hasattr(bcontext, 'getUserName'):
raise 'GroupDataError', "Can't find group data"
raise 'GroupDataError'("Can't find group data")
Copy link
Member

Choose a reason for hiding this comment

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

This must be really old code. The old code gives a TypeError on Python 2.6 and higher.
Your new code gives "TypeError: 'str' object is not callable".
Probably best to define a GroupDataError class that inherits from Exception, and raise that here.

@pbauer pbauer merged commit 3172fb8 into master Mar 22, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants