FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS Development

 
 
LinkBack Thread Tools
 
Old 03-12-2009, 10:58 AM
Radek Vykydal
 
Default Fix importing of format modules.

MartinG is going to use imp instead __import__ here, so this is only temporary
solution to make things works again
---
storage/formats/__init__.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py
index 3cdc908..4aab34d 100644
--- a/storage/formats/__init__.py
+++ b/storage/formats/__init__.py
@@ -107,7 +107,8 @@ def collect_device_format_classes():
mod_name = module_file[:-3]
# imputil is deprecated in python 2.6
try:
- globals()[mod_name] = __import__(mod_name)
+ globals()[mod_name] = __import__('storage.formats.'+mod_name,
+ fromlist='foo')
except ImportError, e:
log.debug("import of device format module '%s' failed" % mod_name)

--
1.5.4.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 03-12-2009, 11:09 AM
Radek Vykydal
 
Default Fix importing of format modules.

Radek Vykydal wrote:

MartinG is going to use imp instead __import__ here, so this is only temporary
solution to make things works again


... obsoleted by MartinG's better patch

---
storage/formats/__init__.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/storage/formats/__init__.py b/storage/formats/__init__.py
index 3cdc908..4aab34d 100644
--- a/storage/formats/__init__.py
+++ b/storage/formats/__init__.py
@@ -107,7 +107,8 @@ def collect_device_format_classes():
mod_name = module_file[:-3]
# imputil is deprecated in python 2.6
try:
- globals()[mod_name] = __import__(mod_name)
+ globals()[mod_name] = __import__('storage.formats.'+mod_name,
+ fromlist='foo')
except ImportError, e:
log.debug("import of device format module '%s' failed" % mod_name)




_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 08:44 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org