GEPS008: Create new module for file utilities

svn: r19906
This commit is contained in:
Nick Hall
2012-06-23 22:13:23 +00:00
parent 3ec4c0f80c
commit 2a0b009bdf
51 changed files with 424 additions and 360 deletions

View File

@@ -49,7 +49,7 @@ import logging
import const
from gen.config import config
from gen.utils.configmanager import safe_eval
import Utils
from gen.utils.file import get_unicode_path_from_env_var
# Note: Make sure to edit const.py.in POPT_TABLE too!
_HELP = _("""
@@ -216,7 +216,7 @@ class ArgParser(object):
# -Ärik is '-\xc3\x84rik' and getopt will respond :
# option -\xc3 not recognized
for arg in range(len(self.args) - 1):
self.args[arg+1] = Utils.get_unicode_path_from_env_var(self.args[arg + 1])
self.args[arg+1] = get_unicode_path_from_env_var(self.args[arg + 1])
options, leftargs = getopt.getopt(self.args[1:],
const.SHORTOPTS, const.LONGOPTS)
except getopt.GetoptError, msg:
@@ -350,7 +350,7 @@ class ArgParser(object):
# but not for non-latin characters in list elements
cliargs = "[ "
for arg in range(len(self.args) - 1):
cliargs += Utils.get_unicode_path_from_env_var(self.args[arg + 1]) + " "
cliargs += get_unicode_path_from_env_var(self.args[arg + 1]) + " "
cliargs += "]"
self.errors += [(_('Error parsing the arguments'),
_("Error parsing the arguments: %s \n"