projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3395656
)
luci-app-ddns: gracefully handle missing control file
author
Jo-Philipp Wich
<jo@mein.io>
Thu, 20 Oct 2022 08:13:38 +0000
(10:13 +0200)
committer
Jo-Philipp Wich
<jo@mein.io>
Thu, 20 Oct 2022 08:13:38 +0000
(10:13 +0200)
In case `pcall()` fails, `ctrl` will contain an error message.
Fixes: 3395656b9f ("luci-app-ddns: get rid of luci-lib-ipkg depdency")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns
patch
|
blob
|
history
diff --git
a/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns
b/applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns
index 6db329c18690e4ad1dca4ec7944d0473f4415256..b2e60cb3c2d32c63f4b2dc71ee985c12c555c61f 100755
(executable)
--- a/
applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns
+++ b/
applications/luci-app-ddns/root/usr/libexec/rpcd/luci.ddns
@@
-160,8
+160,8
@@
local methods = {
local res = {}
local ver
- local
_
, ctrl = pcall(io.lines, "/usr/lib/opkg/info/%s.control" % srv_name)
- if
ctrl
then
+ local
ok
, ctrl = pcall(io.lines, "/usr/lib/opkg/info/%s.control" % srv_name)
+ if
ok
then
for line in ctrl do
ver = line:match("^Version: (.+)$")