Changeset View
Changeset View
Standalone View
Standalone View
pykolab/cli/sieve/cmd_list.py
Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | def execute(*args, **kw): | ||||
result = sieveclient._plain_authentication( | result = sieveclient._plain_authentication( | ||||
admin_login, | admin_login, | ||||
admin_password, | admin_password, | ||||
address | address | ||||
) | ) | ||||
if not result: | if not result: | ||||
print "LOGIN FAILED??" | print("LOGIN FAILED??") | ||||
sieveclient.authenticated = True | sieveclient.authenticated = True | ||||
result = sieveclient.listscripts() | result = sieveclient.listscripts() | ||||
if result == None: | if result == None: | ||||
print "No scripts" | print("No scripts") | ||||
sys.exit(0) | sys.exit(0) | ||||
(active, scripts) = result | (active, scripts) = result | ||||
print "%s (active)" % (active) | print("%s (active)" % (active)) | ||||
for script in scripts: | for script in scripts: | ||||
print script | print(script) | ||||