Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #85440
| References | <CAFo8oMD+JZPuw3WedDOPDUo1+M+Qh-08rd57SfZneFFAG7u4mQ@mail.gmail.com> <CAPTjJmrPw56ZyEtnaXoDKCLCfGJ91AtwZTfifuBzw6kzHqmNmQ@mail.gmail.com> <CAFo8oMCMgwofgfv4Rq-anfNd9eV7bedJjjngYbF6-ANDkri17w@mail.gmail.com> |
|---|---|
| Date | 2015-02-10 14:00 +0530 |
| Subject | Re: Varable parsing error with python |
| From | OmPs <torque.india@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.18605.1423557491.18130.python-list@python.org> (permalink) |
[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 | Next — Next in thread | Find similar | Unroll 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