import subprocess


def load_configuration(environment):
    configuration = {
        "project": "nimp",
        "project_version": { "identifier": "0.9.6" },
        "distribution": "nimp-cli",
    }

    revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()
    branch = subprocess.run([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()

    configuration["project_version"]["revision"] = revision
    configuration["project_version"]["branch"] = branch
    configuration["project_version"]["numeric"] = "{identifier}".format(**configuration["project_version"])
    configuration["project_version"]["full"] = "{identifier}+{revision}".format(**configuration["project_version"])

    return configuration

import subprocess


def load_configuration(environment):
    configuration = {
        "project": "nimp",
        "project_version": { "identifier": "0.9.6" },
        "distribution": "nimp-cli",
    }

    configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ]).decode("utf-8").strip()
    configuration["project_version"]["branch"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ]).decode("utf-8").strip()
    configuration["project_version"]["numeric"] = "{identifier}".format(**configuration["project_version"])
    configuration["project_version"]["full"] = "{identifier}+{revision}".format(**configuration["project_version"])

    return configuration

Change distribution script to support python 3.5
Change distribution script to support python 3.5

  import subprocess
  
  
  def load_configuration(environment):
      configuration = {
          "project": "nimp",
          "project_version": { "identifier": "0.9.6" },
          "distribution": "nimp-cli",
      }
  
+     configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ]).decode("utf-8").strip()
+     configuration["project_version"]["branch"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ]).decode("utf-8").strip()
-     revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()
-     branch = subprocess.run([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()
- 
-     configuration["project_version"]["revision"] = revision
-     configuration["project_version"]["branch"] = branch
      configuration["project_version"]["numeric"] = "{identifier}".format(**configuration["project_version"])
      configuration["project_version"]["full"] = "{identifier}+{revision}".format(**configuration["project_version"])
  
      return configuration
  
Change distribution script to support python 3.5
## Code Before:
import subprocess


def load_configuration(environment):
    configuration = {
        "project": "nimp",
        "project_version": { "identifier": "0.9.6" },
        "distribution": "nimp-cli",
    }

    revision = subprocess.run([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()
    branch = subprocess.run([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ], check = True, capture_output = True).stdout.decode("utf-8").strip()

    configuration["project_version"]["revision"] = revision
    configuration["project_version"]["branch"] = branch
    configuration["project_version"]["numeric"] = "{identifier}".format(**configuration["project_version"])
    configuration["project_version"]["full"] = "{identifier}+{revision}".format(**configuration["project_version"])

    return configuration

## Instruction:
Change distribution script to support python 3.5
## Code After:
import subprocess


def load_configuration(environment):
    configuration = {
        "project": "nimp",
        "project_version": { "identifier": "0.9.6" },
        "distribution": "nimp-cli",
    }

    configuration["project_version"]["revision"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--short=10", "HEAD" ]).decode("utf-8").strip()
    configuration["project_version"]["branch"] = subprocess.check_output([ environment["git_executable"], "rev-parse", "--abbrev-ref", "HEAD" ]).decode("utf-8").strip()
    configuration["project_version"]["numeric"] = "{identifier}".format(**configuration["project_version"])
    configuration["project_version"]["full"] = "{identifier}+{revision}".format(**configuration["project_version"])

    return configuration
