diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-03-31 11:19:56 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-03-31 19:07:51 +0300 |
commit | 385bd7791ee1a11a8ab017f260013b5d8080703f (patch) | |
tree | dc6d15ce0f09fa534d6b1f5c0b21215d5cfc1e66 /awall-cli | |
parent | 2656abb8e17b5537420538309ddaed34aee3e7f1 (diff) | |
download | awall-385bd7791ee1a11a8ab017f260013b5d8080703f.tar.bz2 awall-385bd7791ee1a11a8ab017f260013b5d8080703f.tar.xz |
eliminate explicit use of string module
Diffstat (limited to 'awall-cli')
-rwxr-xr-x | awall-cli | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -107,12 +107,12 @@ if not util.contains({'translate', 'activate', 'fallback', 'flush', pol_paths = {} for i, cls in ipairs{'mandatory', 'optional', 'private'} do - path = os.getenv('AWALL_PATH_'..string.upper(cls)) + path = os.getenv('AWALL_PATH_'..cls:upper()) if path then pol_paths[cls] = util.split(path, ':') end end if stringy.endswith(arg[0], '/awall-cli') then - basedir = string.sub(arg[0], 1, -11) + basedir = arg[0]:sub(1, -11) if not pol_paths.mandatory then pol_paths.mandatory = {'/etc/awall'} end @@ -185,7 +185,7 @@ if not uerror.call( expinput = input:expand() function capitalize(cls) - return string.upper(string.sub(cls, 1, 1))..string.sub(cls, 2, -1) + return cls:sub(1, 1):upper()..cls:sub(2, -1) end for cls, objs in pairs(input.data) do |