Commit 6f9d7dc8 authored by Tarek Ziadé's avatar Tarek Ziadé

cleaned up the module (PEP 8 + old fashion test removal)

parent fa1b455a
...@@ -8,7 +8,6 @@ platform-independent data files.""" ...@@ -8,7 +8,6 @@ platform-independent data files."""
__revision__ = "$Id$" __revision__ = "$Id$"
import os import os
from types import StringType
from distutils.core import Command from distutils.core import Command
from distutils.util import change_root, convert_path from distutils.util import change_root, convert_path
...@@ -35,7 +34,7 @@ class install_data(Command): ...@@ -35,7 +34,7 @@ class install_data(Command):
self.data_files = self.distribution.data_files self.data_files = self.distribution.data_files
self.warn_dir = 1 self.warn_dir = 1
def finalize_options (self): def finalize_options(self):
self.set_undefined_options('install', self.set_undefined_options('install',
('install_data', 'install_dir'), ('install_data', 'install_dir'),
('root', 'root'), ('root', 'root'),
...@@ -45,7 +44,7 @@ class install_data(Command): ...@@ -45,7 +44,7 @@ class install_data(Command):
def run(self): def run(self):
self.mkpath(self.install_dir) self.mkpath(self.install_dir)
for f in self.data_files: for f in self.data_files:
if type(f) is StringType: if isinstance(f, str):
# it's a simple file, so copy it # it's a simple file, so copy it
f = convert_path(f) f = convert_path(f)
if self.warn_dir: if self.warn_dir:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment