From 2f81254efe7054cdaa0ccd882cadf734348238cc Mon Sep 17 00:00:00 2001 From: Parth Kolekar Date: Mon, 16 Mar 2015 01:07:59 +0530 Subject: [PATCH] Added A Minshare feature --- dtella/client/pull_dconfig.py | 12 +++++++++++- dtella/local_config.py | 2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/dtella/client/pull_dconfig.py b/dtella/client/pull_dconfig.py index 2f9ec8c..a4c3ff9 100644 --- a/dtella/client/pull_dconfig.py +++ b/dtella/client/pull_dconfig.py @@ -53,7 +53,17 @@ def __init__(self, main): self.cfgRefresh_dcall = None - self.minshare = 1 + try: + self.minshare = int(local.AGREED_UPON_MINSHARE) + except ValueError: + print "Current value : %s. Must be integer parsable" % (local.AGREED_UPON_MINSHARE) + self.minshare = 2e10 + except AttributeError: + print "Minshare not defined." + self.minshare = 2e10 + except: + self.minshare = 2e10 + self.version = None diff --git a/dtella/local_config.py b/dtella/local_config.py index a5e14e5..91e8bd2 100644 --- a/dtella/local_config.py +++ b/dtella/local_config.py @@ -176,3 +176,5 @@ def hostnameToLocation(hostname): read_board_edit_url = 'http://markdownshare.com/edit/' read_board_view_id = 'a3e2d6b1-6d74-44ec-a230-f866e90898b4' read_board_view_url = 'http://markdownshare.com/raw/' + read_board_view_id + +AGREED_UPON_MINSHARE = 2e10