Skip to content

Commit

Permalink
Check argument if it is a file ending with .rpm (RhBug:1436570)
Browse files Browse the repository at this point in the history
https://bugzilla.redhat.com/show_bug.cgi?id=1436570

Closes: #211
Approved by: ignatenkobrain
  • Loading branch information
j-mracek authored and DNF Bot committed Apr 24, 2017
1 parent 523720f commit b5e4a95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ def _get_source_packages(pkgs):

def _get_query(self, pkg_spec):
"""Return a query to match a pkg_spec."""
if os.path.exists(pkg_spec):
if pkg_spec.endswith('.rpm') and os.path.isfile(pkg_spec):
pkgs = self.base.add_remote_rpms([pkg_spec])
pkg_spec = "{0.name}-{0.epoch}:{0.version}-{0.release}.{0.arch}".format(pkgs[0])

Expand Down

0 comments on commit b5e4a95

Please sign in to comment.