1919import click
2020import semantic_version
2121
22- from platformio import __version__ , app , exception , fs , telemetry
22+ from platformio import __version__ , app , exception , fs
2323from platformio .cache import cleanup_content_cache
2424from platformio .cli import PlatformioCLI
2525from platformio .commands .upgrade import get_latest_version
3232def on_cmd_start (ctx , caller ):
3333 app .set_session_var ("command_ctx" , ctx )
3434 set_caller (caller )
35- telemetry .on_cmd_start (ctx )
3635 if PlatformioCLI .in_silence ():
3736 return
3837 after_upgrade (ctx )
@@ -57,14 +56,6 @@ def on_cmd_end():
5756 )
5857
5958
60- def on_platformio_exception (exc ):
61- telemetry .log_exception (exc )
62-
63-
64- def on_platformio_exit ():
65- telemetry .on_exit ()
66-
67-
6859def set_caller (caller = None ):
6960 caller = caller or os .getenv ("PLATFORMIO_CALLER" )
7061 if not caller :
@@ -103,7 +94,6 @@ def _appstate_migration(_):
10394 state_path = app .resolve_state_path ("core_dir" , "appstate.json" )
10495 if not os .path .isfile (state_path ):
10596 return True
106- app .delete_state_item ("telemetry" )
10797 created_at = app .get_state_item ("created_at" , None )
10898 if not created_at :
10999 state_stat = os .stat (state_path )
@@ -160,14 +150,6 @@ def after_upgrade(ctx):
160150 "PlatformIO has been successfully upgraded to %s!\n " % __version__ ,
161151 fg = "green" ,
162152 )
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- )
171153
172154 return print_welcome_banner ()
173155
@@ -183,22 +165,6 @@ def print_welcome_banner():
183165 click .style ("https://github.com/platformio/platformio-core" , fg = "cyan" ),
184166 )
185167 )
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- )
202168
203169 click .echo ("*" * terminal_width )
204170 click .echo ("" )
0 commit comments