From 870b306b8641f92c7e562cdc6bf932c1ae03ee70 Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Sat, 23 Jan 2016 21:01:25 +0200 Subject: [PATCH] Handle caller id from os environment --- platformio/__init__.py | 2 +- platformio/__main__.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/platformio/__init__.py b/platformio/__init__.py index abb8deef..80a7f604 100644 --- a/platformio/__init__.py +++ b/platformio/__init__.py @@ -14,7 +14,7 @@ import sys -VERSION = (2, 7, "2.dev5") +VERSION = (2, 7, "2.dev6") __version__ = ".".join([str(s) for s in VERSION]) __title__ = "platformio" diff --git a/platformio/__main__.py b/platformio/__main__.py index 8fe2359f..c553e8f6 100644 --- a/platformio/__main__.py +++ b/platformio/__main__.py @@ -71,6 +71,8 @@ class PlatformioCLI(click.MultiCommand): # pylint: disable=R0904 @click.option("--caller", "-c", help="Caller ID (service).") @click.pass_context def cli(ctx, force, caller): + if not caller and getenv("PLATFORMIO_CALLER"): + caller = getenv("PLATFORMIO_CALLER") maintenance.on_platformio_start(ctx, force, caller)