fix syntax error

Traceback (most recent call last):
  File "/home/brain/Projects/upstream/rust2rpm/cargodeps.py", line 140, in <module>
    md = Metadata(f)
  File "/home/brain/Projects/upstream/rust2rpm/cargodeps.py", line 43, in __init__
    self._parse_metadata(json.loads(metadata))
  File "/home/brain/Projects/upstream/rust2rpm/cargodeps.py", line 92, in _parse_metadata
    self._provides = [Dependency(name, version)]
NameError: name 'name' is not defined

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Gnatenko 2017-02-03 09:42:57 +01:00
parent e2f321d603
commit a101585005

View file

@ -89,9 +89,9 @@ class Metadata(object):
self.version = semver.SpecItem("={}".format(md["version"])) self.version = semver.SpecItem("={}".format(md["version"]))
# Provides # Provides
self._provides = [Dependency(name, version)] self._provides = [Dependency(self.name, self.version)]
for feature in md["features"]: for feature in md["features"]:
self._provides.append(Dependency(name, version, feature=feature)) self._provides.append(Dependency(self.name, self.version, feature=feature))
# Requires, Conflicts # Requires, Conflicts
self._requires = [] self._requires = []