Skip to content

Commit

Permalink
Add OS information to Crash post
Browse files Browse the repository at this point in the history
Fixes #1
  • Loading branch information
bobbyg603 committed Apr 2, 2021
1 parent d7192e3 commit 8bfeefa
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/bugsplat/bugsplat.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import json
import os
import platform
import requests
import traceback
import sys
Expand Down Expand Up @@ -51,6 +52,10 @@ def post(self, ex, additionalFilePaths = [], appKey = '', description = '', emai
if (len(additionalFilePaths) == 0): additionalFilePaths = self.additionalFilePaths
files = self._createFilesForPost(additionalFilePaths)

pyVersion = sys.version.split('\n')[0].rstrip()
osVersion = platform.platform()
environment = 'Python ' + pyVersion + ' ' + osVersion

data = {
'database': self.database,
'appName': self.application,
Expand All @@ -60,7 +65,8 @@ def post(self, ex, additionalFilePaths = [], appKey = '', description = '', emai
'exceptionMessage': exceptionMessage,
'email': email,
'user': user,
'callstack': callstack
'callstack': callstack,
'environment': environment
}

try:
Expand Down

0 comments on commit 8bfeefa

Please sign in to comment.