[PATCH] Don't use relative imports

Vratislav Podzimek vpodzime at redhat.com
Thu Sep 26 13:27:46 UTC 2013


On Wed, 2013-09-25 at 16:48 -0400, David Shea wrote:
> ---
>  pyanaconda/anaconda.py                   |  8 ++++----
>  pyanaconda/anaconda_log.py               |  2 +-
>  pyanaconda/anaconda_optparse.py          |  2 +-
>  pyanaconda/constants.py                  |  2 +-
>  pyanaconda/exception.py                  |  6 +++---
>  pyanaconda/flags.py                      |  2 +-
>  pyanaconda/geoloc.py                     |  2 +-
>  pyanaconda/image.py                      |  6 +++---
>  pyanaconda/installclass.py               |  2 +-
>  pyanaconda/iutil.py                      |  8 ++++----
>  pyanaconda/kickstart.py                  | 12 ++++++------
>  pyanaconda/network.py                    |  4 ++--
>  pyanaconda/packaging/livepayload.py      |  2 +-
>  pyanaconda/queue.py                      |  2 +-
>  pyanaconda/rescue.py                     | 16 ++++++++--------
>  pyanaconda/simpleconfig.py               |  2 +-
>  pyanaconda/text.py                       |  2 +-
>  pyanaconda/ui/__init__.py                |  2 +-
>  pyanaconda/ui/gui/__init__.py            | 10 +++++-----
>  pyanaconda/ui/tui/__init__.py            |  8 ++++----
>  pyanaconda/ui/tui/hubs/__init__.py       |  2 +-
>  pyanaconda/ui/tui/simpleline/__init__.py |  4 ++--
>  pyanaconda/ui/tui/simpleline/widgets.py  |  2 +-
>  pyanaconda/ui/tui/tuiobject.py           |  2 +-
>  pyanaconda/users.py                      |  2 +-
>  pyanaconda/vnc.py                        |  6 +++---
>  tests/pylint/runpylint.sh                |  3 +--
>  27 files changed, 60 insertions(+), 61 deletions(-)
> 
> diff --git a/pyanaconda/anaconda.py b/pyanaconda/anaconda.py
> index 9a5aecc..759f6d4 100644
> --- a/pyanaconda/anaconda.py
> +++ b/pyanaconda/anaconda.py
> @@ -30,7 +30,7 @@
>  
>  import os
>  import sys
> -from constants import ROOT_PATH
> +from pyanaconda.constants import ROOT_PATH
>  from tempfile import mkstemp
>  
>  from pyanaconda.bootloader import get_bootloader
> @@ -43,7 +43,7 @@ stdoutLog = logging.getLogger("anaconda.stdout")
>  
>  class Anaconda(object):
>      def __init__(self):
> -        import desktop
> +        import pyanaconda.desktop as desktop
Maybe it's just a matter of opinion, but I'd like 'from pyanaconda
import desktop' here more and in some other places below instead of
'import pyanaconda.MODULE as MODULE'.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list