Add missing function

This commit is contained in:
shortcutme 2019-04-29 17:18:02 +02:00
parent fd085d2d37
commit f318f76994
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE

View file

@ -72,6 +72,13 @@ def getFreeSpace():
return free_space return free_space
def sqlquote(value):
if type(value) is int:
return str(value)
else:
return "'%s'" % value.replace("'", "''")
def shellquote(*args): def shellquote(*args):
if len(args) == 1: if len(args) == 1:
return '"%s"' % args[0].replace('"', "") return '"%s"' % args[0].replace('"', "")