diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-07-11 19:55:00 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-07-11 20:02:35 +0200 |
commit | 836bffc3f25d5752f8c72ba2c547318aea62faae (patch) | |
tree | b24f58d4643240e1e8623cfe5ddf405efd6f70a1 /whatmaps | |
parent | f758314abe0c3c4cc2b06ca5a24c7288a0af41ed (diff) |
Make imports python2 and python3 compatible
Do this again and I'll rewrite you in ruby.
Diffstat (limited to 'whatmaps')
-rw-r--r-- | whatmaps/debiandistro.py | 4 | ||||
-rw-r--r-- | whatmaps/distro.py | 16 |
2 files changed, 10 insertions, 10 deletions
diff --git a/whatmaps/debiandistro.py b/whatmaps/debiandistro.py index 5333a35..9294c9f 100644 --- a/whatmaps/debiandistro.py +++ b/whatmaps/debiandistro.py @@ -31,12 +31,12 @@ import subprocess import sys import string -import distro +import whatmaps.distro from . debianpkg import DebianPkg from . pkg import PkgError from . systemd import Systemd -class DebianDistro(distro.Distro): +class DebianDistro(whatmaps.distro.Distro): "Debian (dpkg) based distribution" id = 'Debian' diff --git a/whatmaps/distro.py b/whatmaps/distro.py index a575a70..f0f08eb 100644 --- a/whatmaps/distro.py +++ b/whatmaps/distro.py @@ -95,8 +95,8 @@ class Distro(object): def detect(): return detect() -import debiandistro -import redhatdistro +import whatmaps.debiandistro +import whatmaps.redhatdistro def detect(): """ @@ -119,16 +119,16 @@ def detect(): # id is None in this case pass - if id == debiandistro.DebianDistro.id: - return debiandistro.DebianDistro - elif id == redhatdistro.FedoraDistro.id: - return redhatdistro.FedoraDistro + if id == whatmaps.debiandistro.DebianDistro.id: + return whatmaps.debiandistro.DebianDistro + elif id == whatmaps.redhatdistro.FedoraDistro.id: + return whatmaps.redhatdistro.FedoraDistro else: if os.path.exists('/usr/bin/dpkg'): logging.warning("Unknown distro but dpkg found, assuming Debian") - return debiandistro.DebianDistro + return whatmaps.debiandistro.DebianDistro elif os.path.exists('/bin/rpm'): logging.warning("Unknown distro but rpm found, assuming Fedora") - return debiandistro.FedoraDistro + return whatmaps.debiandistro.FedoraDistro else: return None |