forked from platformio/platformio-core
Implement app.get_project_id()
This commit is contained in:
@@ -258,6 +258,10 @@ def get_cid():
|
||||
return cid
|
||||
|
||||
|
||||
def get_project_id(project_dir):
|
||||
return hashlib.sha1(hashlib_encode_data(project_dir)).hexdigest()
|
||||
|
||||
|
||||
def get_user_agent():
|
||||
data = [
|
||||
"PlatformIO/%s" % __version__,
|
||||
|
@@ -13,7 +13,6 @@
|
||||
# limitations under the License.
|
||||
|
||||
import atexit
|
||||
import hashlib
|
||||
import os
|
||||
import queue
|
||||
import re
|
||||
@@ -27,7 +26,6 @@ import requests
|
||||
|
||||
from platformio import __title__, __version__, app, exception, fs, util
|
||||
from platformio.cli import PlatformioCLI
|
||||
from platformio.compat import hashlib_encode_data
|
||||
from platformio.debug.config.base import DebugConfigBase
|
||||
from platformio.http import HTTPSession, ensure_internet_on
|
||||
from platformio.proc import is_ci
|
||||
@@ -220,7 +218,7 @@ def dump_project_env_params(config, env, platform):
|
||||
for option in non_sensitive_data
|
||||
if config.has_option(section, option)
|
||||
}
|
||||
params["pid"] = hashlib.sha1(hashlib_encode_data(config.path)).hexdigest()
|
||||
params["pid"] = app.get_project_id(os.path.dirname(config.path))
|
||||
params["platform_name"] = platform.name
|
||||
params["platform_version"] = platform.version
|
||||
return params
|
||||
|
Reference in New Issue
Block a user