Return-Path: X-Original-To: apmail-ambari-issues-archive@minotaur.apache.org Delivered-To: apmail-ambari-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BC88619C63 for ; Fri, 22 Apr 2016 16:00:16 +0000 (UTC) Received: (qmail 46122 invoked by uid 500); 22 Apr 2016 16:00:14 -0000 Delivered-To: apmail-ambari-issues-archive@ambari.apache.org Received: (qmail 46029 invoked by uid 500); 22 Apr 2016 16:00:14 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 45975 invoked by uid 99); 22 Apr 2016 16:00:14 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Apr 2016 16:00:14 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 3D9202C1F60 for ; Fri, 22 Apr 2016 16:00:14 +0000 (UTC) Date: Fri, 22 Apr 2016 16:00:14 +0000 (UTC) From: "Di Li (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (AMBARI-16043) version_builder.py fails to run against Python 2.6 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-16043?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Di Li updated AMBARI-16043: --------------------------- Status: Patch Available (was: Open) > version_builder.py fails to run against Python 2.6 > -------------------------------------------------- > > Key: AMBARI-16043 > URL: https://issues.apache.org/jira/browse/AMBARI-16043 > Project: Ambari > Issue Type: Bug > Components: contrib > Affects Versions: trunk > Reporter: Di Li > Assignee: Di Li > Fix For: trunk > > Attachments: AMBARI-16043.patch > > > version_builder.py uses the new xpath syntax only supported by ElementTree in Python 2.7 and newer. So running the example.py to invoke version_builder.py to create version XML fails with the following error when Python is version 2.6.x > [root@myserver version-builder]$ python example.py > Traceback (most recent call last): > File "example.py", line 38, in > main(sys.argv) > File "example.py", line 29, in main > vb.add_manifest("HDFS-271", "HDFS", "2.7.1.2.4.0") > File "/home/otto/dev/oss/ambari/trunk/ambari_trunk/contrib/version-builder/version_builder.py", line 122, in add_manifest > service_element = manifest_element.find("./service[@id='{0}']".format(id)) > File "/usr/lib64/python2.6/xml/etree/ElementTree.py", line 330, in find > return ElementPath.find(self, path) > File "/usr/lib64/python2.6/xml/etree/ElementPath.py", line 186, in find > return _compile(path).find(element) > File "/usr/lib64/python2.6/xml/etree/ElementPath.py", line 176, in _compile > p = Path(path) > File "/usr/lib64/python2.6/xml/etree/ElementPath.py", line 93, in __init__ > "expected path separator (%s)" % (op or tag) > SyntaxError: expected path separator ([) -- This message was sent by Atlassian JIRA (v6.3.4#6332)