Convert relative imports within rpm package to absolute imports
authorDavid Malcolm <dmalcolm@redhat.com>
Thu, 15 Oct 2009 19:14:58 +0000 (15:14 -0400)
committerPanu Matilainen <pmatilai@redhat.com>
Thu, 29 Oct 2009 15:03:57 +0000 (17:03 +0200)
python/rpm/__init__.py
python/rpm/transaction.py

index 56a7295..b7021ce 100644 (file)
@@ -6,10 +6,9 @@ This module enables you to manipulate rpms and the rpm database.
 
 import warnings
 import os
-from _rpm import *
-from transaction import *
-
-import _rpm
+from rpm._rpm import *
+from rpm.transaction import *
+import rpm._rpm as _rpm
 _RPMVSF_NODIGESTS = _rpm._RPMVSF_NODIGESTS
 _RPMVSF_NOHEADER = _rpm._RPMVSF_NOHEADER
 _RPMVSF_NOPAYLOAD = _rpm._RPMVSF_NOPAYLOAD
@@ -17,7 +16,7 @@ _RPMVSF_NOSIGNATURES = _rpm._RPMVSF_NOSIGNATURES
 
 # try to import build bits but dont require it
 try:
-    from _rpmb import *
+    from rpm._rpmb import *
 except ImportError:
     pass
 
index 8e9ab59..aee44cc 100644 (file)
@@ -1,7 +1,7 @@
 #!/usr/bin/python
 
 import rpm
-from _rpm import ts as _rpmts
+from rpm._rpm import ts as _rpmts
 
 # TODO: migrate relevant documentation from C-side
 class TransactionSet(_rpmts):