Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id CDC7F200D3D for ; Mon, 13 Nov 2017 23:26:09 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CC74A160BF3; Mon, 13 Nov 2017 22:26:09 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 16468160BF0 for ; Mon, 13 Nov 2017 23:26:08 +0100 (CET) Received: (qmail 58500 invoked by uid 500); 13 Nov 2017 22:26:08 -0000 Mailing-List: contact dev-help@madlib.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@madlib.apache.org Delivered-To: mailing list dev@madlib.apache.org Received: (qmail 58484 invoked by uid 99); 13 Nov 2017 22:26:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Nov 2017 22:26:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id CE5EADFC25; Mon, 13 Nov 2017 22:26:05 +0000 (UTC) From: iyerr3 To: dev@madlib.apache.org Reply-To: dev@madlib.apache.org References: In-Reply-To: Subject: [GitHub] madlib pull request #197: Fix madlib version parsing for upgrade Content-Type: text/plain Message-Id: <20171113222605.CE5EADFC25@git1-us-west.apache.org> Date: Mon, 13 Nov 2017 22:26:05 +0000 (UTC) archived-at: Mon, 13 Nov 2017 22:26:10 -0000 Github user iyerr3 commented on a diff in the pull request: https://github.com/apache/madlib/pull/197#discussion_r150684741 --- Diff: src/madpack/upgrade_util.py --- @@ -142,11 +142,11 @@ def _load(self): """ # _mad_dbrev = 1.9.1 - if self._mad_dbrev.split('.') < '1.10.0'.split('.'): + if map(int,self._mad_dbrev.split('.')) < map(int,'1.10.0'.split('.')): --- End diff -- Multiple ways to work around that. Ideally, move common functions to a separate module. But easier solution would be to do `import madpack` instead of `from madpack import ...` and then use `madpack._is_rev_gte`. ---