<NME> shared.py
<BEF> import os

__VERSION__ = ''
__PLUGIN_VERSION__ = ''

# Config settings
AUTH = {}

DEBUG = False
SOCK_DEBUG = False
SOCK_SINGLE_READ = False

EXPERT_MODE = False
FLOOTTY_SAFE = True

ALERT_ON_MSG = True
LOG_TO_CONSOLE = False
HEARTBEAT_TIMEOUT = 60

BASE_DIR = os.path.expanduser(os.path.join('~', 'floobits'))


# Shared globals
DEFAULT_HOST = 'floobits.com'
DEFAULT_PORT = 3448
ERROR_COUNT = 0
ERRORS_SENT = 0
# Don't spam us with error reports
MAX_ERROR_REPORTS = 2

PROXY_PORT = 0  # Random port
SHARE_DIR = None
OUTBOUND_FILTER_PROXY_HOST = 'proxy.floobits.com'
OUTBOUND_FILTER_PROXY_PORT = 443
OUTBOUND_FILTERING = False

PROXY_PORT = 0  # Random port
SHARE_DIR = None
COLAB_DIR = ''
PROJECT_PATH = ''
WORKSPACE_WINDOW = None

PERMS = []
FOLLOW_MODE = False
FOLLOW_USERS = set()
SPLIT_MODE = False

AUTO_GENERATED_ACCOUNT = False
PLUGIN_PATH = None

CHAT_VIEW = None
CHAT_VIEW_PATH = None

TICK_TIME = 100
AGENT = None
IGNORE = None

VIEW_TO_HASH = {}

FLOORC_JSON_PATH = os.path.expanduser(os.path.join('~', '.floorc.json'))

INSECURE_SSL = False  # Disable SSL cert valifation

<MSG> Minor cleanup. Make MAX_ERROR_REPORTS zero-based, not negative 1 based.

<DFF> @@ -26,7 +26,7 @@ SECURE = True
 ERROR_COUNT = 0
 ERRORS_SENT = 0
 # Don't spam us with error reports
-MAX_ERROR_REPORTS = 2
+MAX_ERROR_REPORTS = 3
 
 PROXY_PORT = 0  # Random port
 SHARE_DIR = None

{'commit': "diff --git a/floo/common/api.py b/floo/common/api.py\nindex 30bc233..c958a25 100644\n--- a/floo/common/api.py\n+++ b/floo/common/api.py\n@@ -155,13 +155,14 @@ def get_orgs_can_admin():\n \n def send_error(description=None, exception=None):\n     G.ERROR_COUNT += 1\n-    if G.ERRORS_SENT > G.MAX_ERROR_REPORTS:\n+    if G.ERRORS_SENT >= G.MAX_ERROR_REPORTS:\n         msg.warn('Already sent %s errors this session. Not sending any more.' % G.ERRORS_SENT)\n         return\n     data = {\n         'jsondump': {\n             'error_count': G.ERROR_COUNT\n         },\n+        'message': {},\n         'username': G.USERNAME,\n         'dir': G.COLAB_DIR,\n     }\n@@ -173,9 +174,11 @@ def send_error(description=None, exception=None):\n             'description': str(exception),\n             'stack': traceback.format_exc(exception)\n         }\n-        msg.log('Floobits plugin error! Sending exception report: %s' % data['message'])\n     if description:\n-        data['description'] = description\n+        data['message']['description'] = description\n+\n+    msg.log('Floobits plugin error! Sending exception report: %s' % data['message'])\n+\n     try:\n         api_url = 'https://%s/api/log' % (G.DEFAULT_HOST)\n         r = api_request(api_url, data)\ndiff --git a/floo/common/protocols/floo_proto.py b/floo/common/protocols/floo_proto.py\nindex 29d2b10..24a958b 100644\n--- a/floo/common/protocols/floo_proto.py\n+++ b/floo/common/protocols/floo_proto.py\n@@ -101,10 +101,10 @@ class FlooProtocol(base.BaseProtocol):\n                 # XXXX: THIS LOSES DATA\n                 self._buf_in = after\n                 continue\n-            name = data.get('name')\n-            msg.log('got data ' + (name or 'no name'))\n \n+            name = data.get('name')\n             try:\n+                msg.log('got data ' + (name or 'no name'))\n                 self.emit('data', name, data)\n             except Exception as e:\n                 api.send_error('Error handling %s event: %s.' % (name, str(e)), e)\ndiff --git a/floo/common/shared.py b/floo/common/shared.py\nindex b1e196b..8da67bd 100644\n--- a/floo/common/shared.py\n+++ b/floo/common/shared.py\n@@ -26,7 +26,7 @@ SECURE = True\n ERROR_COUNT = 0\n ERRORS_SENT = 0\n # Don't spam us with error reports\n-MAX_ERROR_REPORTS = 2\n+MAX_ERROR_REPORTS = 3\n \n PROXY_PORT = 0  # Random port\n SHARE_DIR = None\n", 'commit_subject': 'Minor cleanup. Make MAX_ERROR_REPORTS zero-based, not negative 1 based.', 'repo_name': 'Floobits/floobits-sublime', 'committer': {'name': 'Geoff Greer', 'email': 'c3918f39022407dee6a0056ceca9b1aa80e8e4ce@greer.fm', 'time_sec': '1398121527', 'tz_offset': '-420', 'date': {'seconds': '1398121527'}}, 'commit_tree': 'd1857b37dcf446bf75b50f22beb605dc1f15730a', 'commit_message': 'Minor cleanup. Make MAX_ERROR_REPORTS zero-based, not negative 1 based.\n', 'language_name': 'Shell', 'license': 'apache-2.0', 'hunks': "@@ -26,7 +26,7 @@ SECURE = True\n ERROR_COUNT = 0\n ERRORS_SENT = 0\n # Don't spam us with error reports\n-MAX_ERROR_REPORTS = 2\n+MAX_ERROR_REPORTS = 3\n \n PROXY_PORT = 0  # Random port\n SHARE_DIR = None\n", 'addition_count': 1, 'deletion_count': 1, 'src_file': 'a/floo/common/shared.py', 'tgt_file': 'b/floo/common/shared.py', 'file_extension': '.py', 'before_file': "import os\n\n__VERSION__ = ''\n__PLUGIN_VERSION__ = ''\n\n# Config settings\nAUTH = {}\n\nDEBUG = False\nSOCK_DEBUG = False\nSOCK_SINGLE_READ = False\n\nEXPERT_MODE = False\nFLOOTTY_SAFE = True\n\nALERT_ON_MSG = True\nLOG_TO_CONSOLE = False\nHEARTBEAT_TIMEOUT = 60\n\nBASE_DIR = os.path.expanduser(os.path.join('~', 'floobits'))\n\n\n# Shared globals\nDEFAULT_HOST = 'floobits.com'\nDEFAULT_PORT = 3448\nERROR_COUNT = 0\nERRORS_SENT = 0\n# Don't spam us with error reports\nMAX_ERROR_REPORTS = 2\n\nPROXY_PORT = 0  # Random port\nSHARE_DIR = None\nOUTBOUND_FILTER_PROXY_HOST = 'proxy.floobits.com'\nOUTBOUND_FILTER_PROXY_PORT = 443\nOUTBOUND_FILTERING = False\n\nPROXY_PORT = 0  # Random port\nSHARE_DIR = None\nCOLAB_DIR = ''\nPROJECT_PATH = ''\nWORKSPACE_WINDOW = None\n\nPERMS = []\nFOLLOW_MODE = False\nFOLLOW_USERS = set()\nSPLIT_MODE = False\n\nAUTO_GENERATED_ACCOUNT = False\nPLUGIN_PATH = None\n\nCHAT_VIEW = None\nCHAT_VIEW_PATH = None\n\nTICK_TIME = 100\nAGENT = None\nIGNORE = None\n\nVIEW_TO_HASH = {}\n\nFLOORC_JSON_PATH = os.path.expanduser(os.path.join('~', '.floorc.json'))\n\nINSECURE_SSL = False  # Disable SSL cert valifation\n", 'message': 'Minor cleanup. Make MAX_ERROR_REPORTS zero-based, not negative 1 based.\n', 'author_name': 'Geoff Greer', 'lang': 'py'}