old_contents: '''
  Created on Dec 26, 2012
  
  __author__ = "Elizabeth 'pidge' Flanagan"
  __copyright__ = "Copyright 2013, Intel Corp."
  __credits__ = ["Elizabeth Flanagan"]
  __license__ = "GPL"
  __version__ = "2.0"
  __maintainer__ = "Elizabeth Flanagan"
  __email__ = "elizabeth.flanagan@intel.com"
  '''
  from buildbot.steps.shell import ShellCommand
  from buildbot.status import progress
  from buildbot.status.results import SUCCESS, FAILURE, WARNINGS
  from buildbot.process.properties import WithProperties
  from twisted.python import log
  from autobuilder.config import *
  
  class GetDistroVersion(ShellCommand):
      haltOnFailure = False
      flunkOnFailure = True
      name = "GetDistroVersion"
      def __init__(self, factory, argdict=None, **kwargs):
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          self.description = "Get Distro Version"
          self.distroversion = None
          self.workerworkdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          ShellCommand.__init__(self, **kwargs)
  
      def start(self):
          buildername=self.getProperty("buildername")
          distroconf=self.workerworkdir + "/" + buildername
          if 'poky' in self.distro:
              distroconf+="/build/meta-yocto/conf/distro/poky.conf|grep 'DISTRO_VERSION = \"'"
          elif 'oecore' in self.distro:
              distroconf+="/build/meta/conf/distro/include/default-distrovars.inc|grep 'DISTRO_VERSION '"
          elif 'angstrom' in self.distro:
              distroconf+="/build/meta-angstrom/conf/distro/angstrom-*.conf|grep 'DISTRO_VERSION = \"'"
          else:
              self.finished(FAILURE)
          cmd = 'cat ' + distroconf
          self.command = cmd
          ShellCommand.start(self)
  
      def commandComplete(self, cmd):
          if cmd.didFail():
              return
          result = cmd.logs['stdio'].getText()
          distroversion = result.replace("DISTRO_VERSION = ", "").replace("-${DATE}","").replace('"','').strip()
          self.setProperty('distroversion', distroversion, "Setting Distro Version")
          self.finished(SUCCESS)
  
      def getText(self, cmd, results):
          return ShellCommand.getText(self, cmd, results)
  
new_contents: '''
  Created on Dec 26, 2012
  
  __author__ = "Elizabeth 'pidge' Flanagan"
  __copyright__ = "Copyright 2013, Intel Corp."
  __credits__ = ["Elizabeth Flanagan"]
  __license__ = "GPL"
  __version__ = "2.0"
  __maintainer__ = "Elizabeth Flanagan"
  __email__ = "elizabeth.flanagan@intel.com"
  '''
  from buildbot.steps.shell import ShellCommand
  from buildbot.status import progress
  from buildbot.status.results import SUCCESS, FAILURE, WARNINGS
  from buildbot.process.properties import WithProperties
  from twisted.python import log
  from autobuilder.config import *
  
  class GetDistroVersion(ShellCommand):
      haltOnFailure = False
      flunkOnFailure = True
      name = "GetDistroVersion"
      def __init__(self, factory, argdict=None, **kwargs):
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          self.description = "Get Distro Version"
          self.distroversion = None
          self.workerworkdir=os.path.join(os.path.join(YOCTO_ABBASE, "yocto-worker"))
          for k, v in argdict.iteritems():
              setattr(self, k, v)
          ShellCommand.__init__(self, **kwargs)
  
      def start(self):
          buildername=self.getProperty("buildername")
          distroconf=self.workerworkdir + "/" + buildername
          if 'poky' in self.distro or 'clanton' in self.distro:
              distroconf+="/build/meta-yocto/conf/distro/poky.conf|grep 'DISTRO_VERSION = \"'"
          elif 'oecore' in self.distro:
              distroconf+="/build/meta/conf/distro/include/default-distrovars.inc|grep 'DISTRO_VERSION '"
          elif 'angstrom' in self.distro:
              distroconf+="/build/meta-angstrom/conf/distro/angstrom-*.conf|grep 'DISTRO_VERSION = \"'"
          else:
              self.finished(FAILURE)
          cmd = 'cat ' + distroconf
          self.command = cmd
          ShellCommand.start(self)
  
      def commandComplete(self, cmd):
          if cmd.didFail():
              return
          result = cmd.logs['stdio'].getText()
          distroversion = result.replace("DISTRO_VERSION = ", "").replace("-${DATE}","").replace('"','').strip()
          self.setProperty('distroversion', distroversion, "Setting Distro Version")
          self.finished(SUCCESS)
  
      def getText(self, cmd, results):
          return ShellCommand.getText(self, cmd, results)
  
subject: Add clanton to distros supported.