From patchwork Wed Jul 6 12:38:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 645277 X-Patchwork-Delegate: guru@ovn.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rl0j31xtcz9sRZ for ; Wed, 6 Jul 2016 22:40:39 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 81455109C6; Wed, 6 Jul 2016 05:40:38 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id B9730109C6 for ; Wed, 6 Jul 2016 05:40:37 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 3CBFF162172 for ; Wed, 6 Jul 2016 06:40:37 -0600 (MDT) X-ASG-Debug-ID: 1467808835-0b32370668102340001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar6.cudamail.com with ESMTP id dXUs9JFL0yryq7Kh (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Wed, 06 Jul 2016 06:40:35 -0600 (MDT) X-Barracuda-Envelope-From: pboca@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx1-pf1.cudamail.com with SMTP; 6 Jul 2016 12:40:34 -0000 Received-SPF: pass (mx1-pf1.cudamail.com: SPF record at cloudbasesolutions.com designates 91.232.152.5 as permitted sender) X-Barracuda-Apparent-Source-IP: 91.232.152.5 X-Barracuda-RBL-IP: 91.232.152.5 Received: from localhost (localhost [127.0.0.1]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 078C4405C5 for ; Wed, 6 Jul 2016 15:40:34 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from cbssmtp1.cloudbase.local ([127.0.0.1]) by localhost (cbssmtp1.cloudbase.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id AaaV6azsfGzt for ; Wed, 6 Jul 2016 15:40:13 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 9F3FB4012E for ; Wed, 6 Jul 2016 15:38:29 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0301.000; Wed, 6 Jul 2016 14:38:29 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-E1-705012236 X-CudaMail-DTE: 070616 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V6 10/17] python tests: Fixed abs_file_name function for Windows X-ASG-Orig-Subj: [##CM-E1-705012236##][PATCH V6 10/17] python tests: Fixed abs_file_name function for Windows Thread-Index: AQHR14NM5K88X7O7kkSm4f8122rcwQ== Date: Wed, 6 Jul 2016 12:38:28 +0000 Message-ID: <1467808691-17280-11-git-send-email-pboca@cloudbasesolutions.com> References: <1467808691-17280-1-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: <1467808691-17280-1-git-send-email-pboca@cloudbasesolutions.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1467808835 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31058 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Subject: [ovs-dev] [PATCH V6 10/17] python tests: Fixed abs_file_name function for Windows X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" On windows a path containint ':' is considered an absolute path. Signed-off-by: Paul-Daniel Boca Acked-by: Alin Gabriel Serdean --- V2: No changes V3: No changes V4: No changes V5: No changes V6: No changes --- python/ovs/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ovs/util.py b/python/ovs/util.py index cb0574b..edcfe81 100644 --- a/python/ovs/util.py +++ b/python/ovs/util.py @@ -30,7 +30,7 @@ def abs_file_name(dir_, file_name): This differs from os.path.abspath() in that it will never change the meaning of a file name.""" - if file_name.startswith('/'): + if file_name.startswith('/') or file_name.find(':') > -1: return file_name else: if dir_ is None or dir_ == "":