platformio / platformio-docs

PlatformIO Documentation
https://docs.platformio.org
Apache License 2.0
240 stars 326 forks source link

Fix dynamic build flags example code #149

Closed tfeldmann closed 4 years ago

tfeldmann commented 4 years ago

This fixes two problems with the example code:

  1. compilation errors like <command-line>:0:9: error: unable to find numeric literal operator 'operator""a5850f' because the git revision macro was not properly escaped
  2. The subprocess module returns bytes. In python3 the script would print -DGIT_REV=b'a5850f' because it is not properly decoded. The new code works in python2 and python3.
CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

ivankravets commented 4 years ago

Thanks for the PR!