Skip to content

Commit

Permalink
Custom classes now inherit from the Object class resolves #6
Browse files Browse the repository at this point in the history
  • Loading branch information
robzenn92 committed Oct 27, 2017
1 parent bdb4c94 commit efec01e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cyclon/cyclon.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from apscheduler.schedulers.background import BackgroundScheduler


class Cyclon:
class Cyclon(object):

def __init__(self):
self.ip = environ['MY_POD_IP']
Expand Down
2 changes: 1 addition & 1 deletion kubernetesClient/kubernetesClient.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from kubernetes.client.rest import ApiException


class KubernetesClient:
class KubernetesClient(object):

# -------------------

Expand Down
2 changes: 1 addition & 1 deletion messages/message.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import json


class Message:
class Message(object):
def __init__(self, source, destination, data):
self.source = source
self.destination = destination
Expand Down
7 changes: 5 additions & 2 deletions partialView/partialView.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from operator import attrgetter


class PodDescriptor:
class PodDescriptor(object):

def __init__(self, ip, age=0):
self.ip = ip
Expand All @@ -24,6 +24,9 @@ def __lt__(self, other):
def __gt__(self, other):
return self.age > other.age

def to_json(self):
return json.dumps(self, default=lambda o: o.__dict__, sort_keys=True, indent=4)

@classmethod
def from_dict(cls, a_dict):
ip = str(a_dict['ip'])
Expand All @@ -33,7 +36,7 @@ def from_dict(cls, a_dict):
__repr__ = __str__


class PartialView:
class PartialView(object):

def __init__(self, ip, limit=int(os.environ['VIEW_LIMIT']), shuffle_length=int(os.environ['SHUFFLE_LENGTH']), peer_list=None):

Expand Down

0 comments on commit efec01e

Please sign in to comment.