diff options
author | Guido Günther <agx@sigxcpu.org> | 2010-09-19 15:58:49 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2010-09-19 15:58:49 +0200 |
commit | 488b19a33fcca3df739809fbf0430ebde9a282d5 (patch) | |
tree | e610e9e4dc42dba132a56cfd903b95f11cb0ee85 /whatmaps | |
parent | 6724648188a6b0a5e10ae90c47e97cbd8584a7a9 (diff) |
Handle dpkg based distros as Debian and rpm based ones as Fedora
Diffstat (limited to 'whatmaps')
-rwxr-xr-x | whatmaps | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -256,7 +256,14 @@ def detect_distro(): elif id == FedoraDistro.id: return FedoraDistro else: - return None + if os.path.exists('/usr/bin/dpkg'): + logging.warning("Unknown distro but dpkg found, assuming Debian") + return DebianDistro + elif os.path.exists('/bin/rpm'): + logging.warning("Unknown distro but rpm found, assuming Fedora") + return FedoraDistro + else: + return None def main(argv): |