[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [test-API 04/14] Move directory dist to src

On 04/19/2012 10:25 AM, Osier Yang wrote:
env_inspect.py is part of the framework.
  {dist =>  src/dist}/__init__.py           |    0
  {dist =>  src/dist}/redhat/__init__.py    |    0
  {dist =>  src/dist}/redhat/env_inspect.py |    0
  src/generator.py                         |    4 ++--
  4 files changed, 2 insertions(+), 2 deletions(-)
  rename {dist =>  src/dist}/__init__.py (100%)
  rename {dist =>  src/dist}/redhat/__init__.py (100%)
  rename {dist =>  src/dist}/redhat/env_inspect.py (100%)

diff --git a/dist/__init__.py b/src/dist/__init__.py
similarity index 100%
rename from dist/__init__.py
rename to src/dist/__init__.py
diff --git a/dist/redhat/__init__.py b/src/dist/redhat/__init__.py
similarity index 100%
rename from dist/redhat/__init__.py
rename to src/dist/redhat/__init__.py
diff --git a/dist/redhat/env_inspect.py b/src/dist/redhat/env_inspect.py
similarity index 100%
rename from dist/redhat/env_inspect.py
rename to src/dist/redhat/env_inspect.py
diff --git a/src/generator.py b/src/generator.py
index e3bc344..26e1553 100644
--- a/src/generator.py
+++ b/src/generator.py
@@ -32,9 +32,9 @@ from utils import env_parser
  # Import of distribution-specific code.  If this is needed somewhere
  # else in the future, please don't copy-paste this, but create some
  # sensible distribution-specific package
-for dist in os.listdir('dist'):
+for dist in os.listdir('src/dist'):
      if os.path.exists('/etc/%s-release' % dist):
-        exec('from dist.%s import env_inspect' % dist)
+        exec('from src.dist.%s import env_inspect' % dist)

  class FuncGen(object):

        maybe the dist folder should be removed.
I rewrote the env_inspect, it is more potable than checking the rpm package.
        so, the dist/redhat is not necessary strongly

        Guannan Ren

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]