Replace improperly used asserts with warnings.
Add awful.spawn noop function to hooks.lua test. Previously it was nil.
This commit is contained in:
parent
a4b06bca58
commit
1c71260389
|
@ -125,6 +125,7 @@ local keygrabber = require("awful.keygrabber")
|
|||
local util = require("awful.util")
|
||||
local beautiful = require("beautiful")
|
||||
local akey = require("awful.key")
|
||||
local debug = require('gears.debug')
|
||||
|
||||
local prompt = {}
|
||||
|
||||
|
@ -518,10 +519,10 @@ function prompt.run(args, textbox, exe_callback, completion_callback,
|
|||
hooks[key] = hooks[key] or {}
|
||||
hooks[key][#hooks[key]+1] = v
|
||||
else
|
||||
assert("The hook's 3rd parameter has to be a function.")
|
||||
debug.print_warning("The hook's 3rd parameter has to be a function.")
|
||||
end
|
||||
else
|
||||
assert("The hook has to have 3 parameters.")
|
||||
debug.print_warning("The hook has to have 3 parameters.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
local parent = ... --DOC_NO_USAGE --DOC_HIDE
|
||||
local wibox = require( "wibox" ) --DOC_HIDE
|
||||
local awful = { prompt = require("awful.prompt"),--DOC_HIDE
|
||||
util = require("awful.util")}--DOC_HIDE
|
||||
util = require("awful.util"), --DOC_HIDE
|
||||
spawn = function () end } --DOC_HIDE
|
||||
local beautiful = require( "beautiful" ) --DOC_HIDE
|
||||
|
||||
local atextbox = wibox.widget.textbox()
|
||||
|
|
Loading…
Reference in New Issue