Varable parsing error with python
OmPs
torque.india at gmail.com
Tue Feb 10 03:30:27 EST 2015
On 10 Feb 2015 13:59, "OmPs" <torque.india at gmail.com> wrote:
>
>
> On 10 Feb 2015 13:12, "Chris Angelico" <rosuav at gmail.com> wrote:
> >
> > On Tue, Feb 10, 2015 at 6:30 PM, OmPs <torque.india at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150210/b60ac17b/attachment.html>
More information about the Python-list
mailing list