aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2023-10-01 21:45:37 +0530
committersinanmohd <sinan@sinanmohd.com>2023-10-01 21:45:37 +0530
commit93fab4b3e185a95497cb789047518aa428f0abd5 (patch)
tree643c17cbdc76c4d3a3c8fb3b5b880328bd0f48ed
parent994715046cedee5b9ab4f61a4112a2c73d506960 (diff)
lib/curl: clean up
-rw-r--r--lib/curl.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/curl.lua b/lib/curl.lua
index a832461..da3b0c7 100644
--- a/lib/curl.lua
+++ b/lib/curl.lua
@@ -28,8 +28,8 @@ local get = function (url, headr, args)
end
fetch = io.popen(cmd):read('*all')
- scode = string.match(fetch, '%d*$')
- fetch = string.gsub(fetch, '%s*%d*$', '')
+ scode = fetch:match('%d*$')
+ fetch = fetch:gsub('%s*%d*$', '')
return fetch, tonumber(scode)
end