Removes id validation from MarathonGroup()#228
Merged
solarkennedy merged 3 commits intothefactory:masterfrom Oct 27, 2017
daltonmatos:feature/remove-id-validation
Merged
Removes id validation from MarathonGroup()#228solarkennedy merged 3 commits intothefactory:masterfrom daltonmatos:feature/remove-id-validation
solarkennedy merged 3 commits intothefactory:masterfrom
daltonmatos:feature/remove-id-validation
Conversation
This validation was preventig the use of the root group (`/`), both from
`MarathonGroup().from_json(<data>)` and `MarathonClient().get_group("/")`
Fixes issue #227
Contributor
Author
|
There are still flake8 errors, but not related to this modification. |
Contributor
|
Can you add a #noqa to get them to pass? |
Contributor
Author
|
Sure, but there are only two errors: The fix is simple and I can add it to this PR. What do you think? This is the fix: diff --git a/marathon/models/base.py b/marathon/models/base.py
index ecc8030..db77076 100644
--- a/marathon/models/base.py
+++ b/marathon/models/base.py
@@ -13,7 +13,7 @@ class MarathonObject(object):
def __eq__(self, other):
try:
return self.__dict__ == other.__dict__
- except:
+ except Exception:
return False
def __hash__(self):
@@ -68,7 +68,7 @@ class MarathonResource(MarathonObject):
def __eq__(self, other):
try:
return self.__dict__ == other.__dict__
- except:
+ except Exception:
return False
def __hash__(self):
Let me know and I will push a new commit. Thanks, |
E722: do not use bare except
Contributor
|
Yes please, just fix it. |
Contributor
Author
|
Done. Thanks, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This validation was preventig the use of the root group (
/), both fromMarathonGroup().from_json(<data>)andMarathonClient().get_group("/")Fixes issue #227