diff options
Diffstat (limited to 'pathod')
| -rw-r--r-- | pathod/utils.py | 23 | 
1 files changed, 2 insertions, 21 deletions
diff --git a/pathod/utils.py b/pathod/utils.py index 1e5bd9a4..d1e2dd00 100644 --- a/pathod/utils.py +++ b/pathod/utils.py @@ -1,5 +1,6 @@  import os  import sys +import netlib.utils  SIZE_UNITS = dict( @@ -75,27 +76,7 @@ def escape_unprintables(s):      return s -class Data(object): - -    def __init__(self, name): -        m = __import__(name) -        dirname, _ = os.path.split(m.__file__) -        self.dirname = os.path.abspath(dirname) - -    def path(self, path): -        """ -            Returns a path to the package data housed at 'path' under this -            module.Path can be a path to a file, or to a directory. - -            This function will raise ValueError if the path does not exist. -        """ -        fullpath = os.path.join(self.dirname, path) -        if not os.path.exists(fullpath): -            raise ValueError("dataPath: %s does not exist." % fullpath) -        return fullpath - - -data = Data(__name__) +data = netlib.utils.Data(__name__)  def daemonize(stdin='/dev/null', stdout='/dev/null', stderr='/dev/null'):  # pragma: no cover  | 
