PackageInfo: apt-file returns exit code 1 on nothing found now.
This commit is contained in:
@ -22,7 +22,7 @@ import supybot
|
||||
import supybot.world as world
|
||||
from importlib import reload
|
||||
|
||||
__version__ = "2.2.0"
|
||||
__version__ = "2.3.0"
|
||||
__author__ = supybot.Author("Krytarik Raido", "krytarik", "krytarik@gmail.com")
|
||||
__contributors__ = {
|
||||
supybot.Author("Dennis Kaarsemaker", "Seveas", "dennis@kaarsemaker.net"): ['Original Concept'],
|
||||
|
@ -86,7 +86,9 @@ class Apt:
|
||||
if filelookup:
|
||||
try:
|
||||
data = self.apt_file(distro, pkg).split()
|
||||
except subprocess.CalledProcessError:
|
||||
except subprocess.CalledProcessError as e:
|
||||
if e.returncode == 1:
|
||||
return 'Package/file %s does not exist in %s' % (pkg, distro)
|
||||
self.log.error("PackageInfo/packages: Please update the cache for %s" % distro)
|
||||
return "Cache out of date, please contact the administrator"
|
||||
except OSError:
|
||||
|
Reference in New Issue
Block a user