Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #85440

Re: Varable parsing error with python

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <torque.india@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.002
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'subject:error': 0.03; 'else:': 0.03; 'skip:f 70': 0.09; 'subject:parsing': 0.09; 'cc:addr:python-list': 0.11; 'python': 0.11; 'def': 0.12; '6:30': 0.16; 'list):': 0.16; 'none.': 0.16; '\xc2\xa0if': 0.16; 'subject:python': 0.16; 'wrote:': 0.18; 'variable': 0.18; 'skip:f 30': 0.19; 'feb': 0.22; 'email addr:gmail.com&gt;': 0.22; 'cc:addr:python.org': 0.22; 'skip:i 40': 0.24; 'cc:2**0': 0.24; '&gt;': 0.26; 'skip:_ 20': 0.27; 'header:In-Reply-To:1': 0.27; 'tried': 0.27; "doesn't": 0.30; 'statement': 0.30; 'message- id:@mail.gmail.com': 0.30; 'url:mailman': 0.30; 'getting': 0.31; 'branches': 0.31; 'skip:i 60': 0.31; 'url:python': 0.33; 'level.': 0.33; 'subject:with': 0.35; 'something': 0.35; 'received:google.com': 0.35; 'skip:f 40': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'error.': 0.37; 'skip:& 10': 0.38; 'pm,': 0.38; 'url:mail': 0.40; 'skip:\xc2 10': 0.60; 'skip:f 50': 0.65; 'to:addr:gmail.com': 0.65; '2015': 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=5SHwIW6cNfTV8ISu2z353+PV2sLuuKFBCDZmNaNPFwQ=; b=IAdKZOPz3gTaZYl3oDs46dHeGOqPERAPJE7eQtmvyHcsbJE9AfakjABAQpXuEwQcwD GS9cwbVqVgXnyjGW716rfPMkawd41YTPexeEZAOWNILh+1DHyeAwtK4uDMFIasFaMRtQ Ug5nxo/PxLAjuZYAbucVn2TIs7jNh0ylN0PFzh6LJKSfq+Y7C34w7RxzQxuVHI9eGU77 10tQuAII4XjK+Sl/T7PpicsnxK6Ma7DCi8m8qpw/uHep9kDa0YjBiDuwoajpZxi4z+m6 EvQu3dboO3Nhe+sBhmOA+N6sUlV4GuKJwq85ZmTjZZgfRBZ8tYq9jnoGmkvkmz+MyAky vCdg==
MIME-Version 1.0
X-Received by 10.202.198.214 with SMTP id w205mr13601305oif.74.1423557027395; Tue, 10 Feb 2015 00:30:27 -0800 (PST)
In-Reply-To <CAFo8oMCMgwofgfv4Rq-anfNd9eV7bedJjjngYbF6-ANDkri17w@mail.gmail.com>
References <CAFo8oMD+JZPuw3WedDOPDUo1+M+Qh-08rd57SfZneFFAG7u4mQ@mail.gmail.com> <CAPTjJmrPw56ZyEtnaXoDKCLCfGJ91AtwZTfifuBzw6kzHqmNmQ@mail.gmail.com> <CAFo8oMCMgwofgfv4Rq-anfNd9eV7bedJjjngYbF6-ANDkri17w@mail.gmail.com>
Date Tue, 10 Feb 2015 14:00:27 +0530
Subject Re: Varable parsing error with python
From OmPs <torque.india@gmail.com>
To Chris Angelico <rosuav@gmail.com>
Content-Type multipart/alternative; boundary=001a1134f13eef7fac050eb7b2f6
Cc python mail list <python-list@python.org>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.18605.1423557491.18130.python-list@python.org> (permalink)
Lines 77
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1423557491 news.xs4all.nl 2853 [2001:888:2000:d::a6]:52284
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:85440

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

On 10 Feb 2015 13:59, "OmPs" <torque.india@gmail.com> wrote:
>
>
> On 10 Feb 2015 13:12, "Chris Angelico" <rosuav@gmail.com> wrote:
> >
> > On Tue, Feb 10, 2015 at 6:30 PM, OmPs <torque.india@gmail.com> wrote:
> > >     def _getPackgeVersion(xmlfile, p):
> > >         package = str(p)
> > >         if isinstance(fpmdict["application"]["package"], list):
> > >             for i in fpmdict["application"]["package"]:
> > >                 if i["@name"] == p:
> > >                     _pkgVersion = i["version"]
> > >         else:
> > >             _pkgversion = fpmdict["application"]["package"]["version"]
> > >             return _pkgVersion
> >
> > One of your branches doesn't have a return statement in it, so Python
> > just returns None. You may want to unindent that return statement one
> > level.
> >
> Tried that as well getting the same error.

I feel its something to do with variable substitution.

> > ChrisA
> > --
> > https://mail.python.org/mailman/listinfo/python-list

Back to comp.lang.python | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: Varable parsing error with python OmPs <torque.india@gmail.com> - 2015-02-10 14:00 +0530
  Re: Varable parsing error with python Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-02-11 10:55 +1100

csiph-web