From 836bffc3f25d5752f8c72ba2c547318aea62faae Mon Sep 17 00:00:00 2001 From: Guido Günther Date: Fri, 11 Jul 2014 19:55:00 +0200 Subject: Make imports python2 and python3 compatible Do this again and I'll rewrite you in ruby. --- whatmaps/distro.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'whatmaps/distro.py') 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 -- cgit v1.2.3