19
19
import click
20
20
import semantic_version
21
21
22
- from platformio import __version__ , app , exception , fs , telemetry
22
+ from platformio import __version__ , app , exception , fs
23
23
from platformio .cache import cleanup_content_cache
24
24
from platformio .cli import PlatformioCLI
25
25
from platformio .commands .upgrade import get_latest_version
32
32
def on_cmd_start (ctx , caller ):
33
33
app .set_session_var ("command_ctx" , ctx )
34
34
set_caller (caller )
35
- telemetry .on_cmd_start (ctx )
36
35
if PlatformioCLI .in_silence ():
37
36
return
38
37
after_upgrade (ctx )
@@ -57,14 +56,6 @@ def on_cmd_end():
57
56
)
58
57
59
58
60
- def on_platformio_exception (exc ):
61
- telemetry .log_exception (exc )
62
-
63
-
64
- def on_platformio_exit ():
65
- telemetry .on_exit ()
66
-
67
-
68
59
def set_caller (caller = None ):
69
60
caller = caller or os .getenv ("PLATFORMIO_CALLER" )
70
61
if not caller :
@@ -103,7 +94,6 @@ def _appstate_migration(_):
103
94
state_path = app .resolve_state_path ("core_dir" , "appstate.json" )
104
95
if not os .path .isfile (state_path ):
105
96
return True
106
- app .delete_state_item ("telemetry" )
107
97
created_at = app .get_state_item ("created_at" , None )
108
98
if not created_at :
109
99
state_stat = os .stat (state_path )
@@ -160,14 +150,6 @@ def after_upgrade(ctx):
160
150
"PlatformIO has been successfully upgraded to %s!\n " % __version__ ,
161
151
fg = "green" ,
162
152
)
163
- telemetry .log_event (
164
- "pio_upgrade_core" ,
165
- {
166
- "label" : "%s > %s" % (last_version_str , __version__ ),
167
- "from_version" : last_version_str ,
168
- "to_version" : __version__ ,
169
- },
170
- )
171
153
172
154
return print_welcome_banner ()
173
155
@@ -183,22 +165,6 @@ def print_welcome_banner():
183
165
click .style ("https://github.com/platformio/platformio-core" , fg = "cyan" ),
184
166
)
185
167
)
186
- click .echo (
187
- "- %s us on LinkedIn to stay up-to-date "
188
- "on the latest project news > %s"
189
- % (
190
- click .style ("follow" , fg = "cyan" ),
191
- click .style ("https://www.linkedin.com/company/platformio/" , fg = "cyan" ),
192
- )
193
- )
194
- if not os .getenv ("PLATFORMIO_IDE" ):
195
- click .echo (
196
- "- %s PlatformIO IDE for embedded development > %s"
197
- % (
198
- click .style ("try" , fg = "cyan" ),
199
- click .style ("https://platformio.org/platformio-ide" , fg = "cyan" ),
200
- )
201
- )
202
168
203
169
click .echo ("*" * terminal_width )
204
170
click .echo ("" )
0 commit comments