Fixing typos and layout issues.
try: OS.unlink(tmp)
except: pass
try: OS.unlink(tmp)
except: pass
- ## If there's a locekfile, then acquire it around the meat of this
+ ## If there's a lockfile, then acquire it around the meat of this
## function; otherwise just do the job.
if me._lock is None:
doit()
## function; otherwise just do the job.
if me._lock is None:
doit()
user = user, service = service)
if D.DB.fetchone() is not None:
raise U.ExpectedError, (
user = user, service = service)
if D.DB.fetchone() is not None:
raise U.ExpectedError, (
- 400, "User `%s' already has `%s' account" % (user, service))
+ 400, "User `%s' already has a `%s' account" % (user, service))
D.DB.execute("""INSERT INTO services (service, user, alias)
VALUES ($service, $user, $alias)""",
service = service, user = user, alias = alias)
D.DB.execute("""INSERT INTO services (service, user, alias)
VALUES ($service, $user, $alias)""",
service = service, user = user, alias = alias)
import util as U
@SC.subcommand(
import util as U
@SC.subcommand(
- 'set', ['remote'],
- 'Set password for remote service',
+ 'set', ['remote'], 'Set password for remote service',
params = [SC.Arg('service'), SC.Arg('user')])
def cmd_set_svc(service, user):
new = U.readline('new password')
params = [SC.Arg('service'), SC.Arg('user')])
def cmd_set_svc(service, user):
new = U.readline('new password')
svc.setpasswd(user, new)
@SC.subcommand(
svc.setpasswd(user, new)
@SC.subcommand(
- 'clear', ['remote'],
- 'Clear password for remote service',
+ 'clear', ['remote'], 'Clear password for remote service',
params = [SC.Arg('service'), SC.Arg('user')])
def cmd_set_svc(service, user):
svc = CU.check_service(service)
params = [SC.Arg('service'), SC.Arg('user')])
def cmd_set_svc(service, user):
svc = CU.check_service(service)
"""
Generate the matching items from a query constructed dynamically.
"""
Generate the matching items from a query constructed dynamically.
- Usually you wouldn't go through this palaver for a static query, but his
+ Usually you wouldn't go through this palaver for a static query, but this
function helps with building queries in pieces. WANT should be a list of
column names we should output, appropriately qualified if there are
multiple tables; TAB should be a list of table names, in the form `FOO as
function helps with building queries in pieces. WANT should be a list of
column names we should output, appropriately qualified if there are
multiple tables; TAB should be a list of table names, in the form `FOO as
R_PAT = RX.compile('%(.)')
def __init__(me, set, clear, *args, **kw):
R_PAT = RX.compile('%(.)')
def __init__(me, set, clear, *args, **kw):
- """
- Initialize the command remote service.
- """
+ """Initialize the command remote service."""
super(CommandRemoteService, me).__init__(*args, **kw)
me._set = set
me._clear = clear
super(CommandRemoteService, me).__init__(*args, **kw)
me._set = set
me._clear = clear
return row
def __enter__(me):
return row
def __enter__(me):
- """
- Context protocol: begin a transaction.
- """
+ """Context protocol: begin a transaction."""
##PRINT('<<< BEGIN')
return
def __exit__(me, exty, exval, tb):
##PRINT('<<< BEGIN')
return
def __exit__(me, exty, exval, tb):