Skip to contentSkip to conversation

pylibmount: correctly import from pylibmount.so

PATCH Applied Dave Reisner 3 participants 3 messages Nov 21, 2013 – Dec 2, 2013 Util-Linux package

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pylibmount: correctly import from pylibmount.so

Without this, python is unable to find the module:

$ python -c 'import libmount'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
    from pylibmount import *
ImportError: No module named 'pylibmount'
---
 libmount/python/libmount/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmount/python/libmount/__init__.py +1 -1
index 243c639..09104e2 100644
@@ -1,2 +1,2 @@
-from pylibmount import *
+from .pylibmount import *
 
Signature · 1 line
1.8.4.2
#1 lore raw

Just wanted to make sure this didn't get lost...

Quoted 25 lines · Dave Reisner

Without this, python is unable to find the module:

$ python -c 'import libmount'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
    from pylibmount import *
ImportError: No module named 'pylibmount'
---
 libmount/python/libmount/__init__.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
libmount/python/libmount/__init__.py +1 -1
index 243c639..09104e2 100644
@@ -1,2 +1,2 @@
-from pylibmount import *
+from .pylibmount import *
 
Signature · 1 line
1.8.4.2
maintainer Applied
#2 lore raw
In reply to Dave Reisner
Quoted 8 lines · Dave Reisner

Without this, python is unable to find the module:

$ python -c 'import libmount'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.3/site-packages/libmount/__init__.py", line 1, in <module>
    from pylibmount import *
ImportError: No module named 'pylibmount'

Hmm... it seems we have always tested this with PYTHONPATH=...

libmount/python/libmount/__init__.py line 1

Quoted 2 lines
libmount/python/libmount/__init__.py +1 -1
-from pylibmount import *
+from .pylibmount import *

Applied, thanks.

Karel

Signature · 2 lines
 Karel Zak  <[email protected]>
 http://karelzak.blogspot.com