コード例 #1
0
 def get_release_from_binary(cls, binary):
     try:
         pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary))
         return cls.get_release_from_tag(
             pex_info.build_properties.get('tag', ''))
     except PythonDirectoryWrapper.Error:
         return 'UNKNOWN'
コード例 #2
0
def get_client_version():
  try:
    pexpath = sys.argv[0]
    pex_info = PexInfo.from_pex(pexpath)
    return ("%s@%s" % (pex_info.build_properties.get("sha", "unknown"),
        pex_info.build_properties.get("date", "unknown")))
  except (IOError, OSError):
    return "VersionUnknown"
コード例 #3
0
def get_client_version():
    try:
        pexpath = sys.argv[0]
        pex_info = PexInfo.from_pex(pexpath)
        return ("%s@%s" % (pex_info.build_properties.get("sha", "unknown"),
                           pex_info.build_properties.get("date", "unknown")))
    except (IOError, OSError):
        return "VersionUnknown"
コード例 #4
0
ファイル: core.py プロジェクト: kevinburg/incubator-aurora
def version(args):
  """usage: version

  Prints information about the version of the aurora client being run.
  """
  try:
    pex_info = PexInfo.from_pex(sys.argv[0])
    print("Aurora client build info:")
    print("\tsha: %s" % pex_info.build_properties['sha'])
    print("\tdate: %s" % pex_info.build_properties['date'])
  except (IOError, OSError):
    print("Aurora client build info not available")
  print("Aurora API version: %s" % CURRENT_API_VERSION)
コード例 #5
0
def version(args):
    """usage: version

  Prints information about the version of the aurora client being run.
  """
    try:
        pex_info = PexInfo.from_pex(sys.argv[0])
        print("Aurora client build info:")
        print("\tsha: %s" % pex_info.build_properties['sha'])
        print("\tdate: %s" % pex_info.build_properties['date'])
    except (IOError, OSError):
        print("Aurora client build info not available")
    print("Aurora API version: %s" % CURRENT_API_VERSION)
コード例 #6
0
 def get_release_from_binary(cls, binary):
   try:
     pex_info = PexInfo.from_pex(PythonDirectoryWrapper.get(binary))
     return cls.get_release_from_tag(pex_info.build_properties.get('tag', ''))
   except PythonDirectoryWrapper.Error:
     return 'UNKNOWN'
コード例 #7
0
 def get_release_from_binary(cls, binary):
   try:
     pex_info = PexInfo.from_pex(binary)
     return cls.get_release_from_tag(pex_info.build_properties.get('tag', ''))
   except (IOError, OSError):
     return 'UNKNOWN'
コード例 #8
0
 def get_release_from_binary(cls, binary):
   try:
     pex_info = PexInfo.from_pex(binary)
     return cls.get_release_from_tag(pex_info.build_properties.get('tag', ''))
   except (IOError, OSError):
     return 'UNKNOWN'