From: Mark Wooding Date: Sat, 24 May 2014 13:00:03 +0000 (+0100) Subject: Cosmetic fiddling. X-Git-Tag: 1.1.0~14 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/chopwood/commitdiff_plain/74b87214c100957fb37de47a8c58f6c3d8cebf3a Cosmetic fiddling. Fixing typos and layout issues. --- diff --git a/backend.py b/backend.py index 1725d7d..8c4d4d1 100644 --- a/backend.py +++ b/backend.py @@ -227,7 +227,7 @@ class FlatFileBackend (object): 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() diff --git a/cmd-admin.py b/cmd-admin.py index 8cea8e7..577fe7a 100644 --- a/cmd-admin.py +++ b/cmd-admin.py @@ -128,7 +128,7 @@ def cmd_addacct(user, service, alias = None): 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) diff --git a/cmd-remote.py b/cmd-remote.py index 6463d53..c8f0aed 100644 --- a/cmd-remote.py +++ b/cmd-remote.py @@ -28,8 +28,7 @@ import subcommand as SC 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') @@ -37,8 +36,7 @@ def cmd_set_svc(service, user): 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) diff --git a/cmdutil.py b/cmdutil.py index a20b8dd..55939e6 100644 --- a/cmdutil.py +++ b/cmdutil.py @@ -144,7 +144,7 @@ def matching_items(want, tab, cond = [], tail = '', **kw): """ 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 diff --git a/service.py b/service.py index 26406b5..8b1c87b 100644 --- a/service.py +++ b/service.py @@ -329,9 +329,7 @@ class CommandRemoteService (BasicRemoteService): 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 diff --git a/util.py b/util.py index 49bd11f..6384fd5 100644 --- a/util.py +++ b/util.py @@ -551,9 +551,7 @@ class SimpleDBConnection (object): return row def __enter__(me): - """ - Context protocol: begin a transaction. - """ + """Context protocol: begin a transaction.""" ##PRINT('<<< BEGIN') return def __exit__(me, exty, exval, tb):